Quantcast
Channel: Configuration and Deployment
Viewing all articles
Browse latest Browse all 3561

URL rewrite rules not working

$
0
0

Hello,

I need to rewrite everything to https://www.goldnroll.ro/{whatever url}

But https://www.goldnroll.ro/ should be rewritten to https://www.goldnroll.ro/acasa 

I tried various solutions that I found on the internet. Currently I have:

<rewrite><rules><rule name="Root Hit Redirect" stopProcessing="false"><match url="^$" /><action type="Redirect" url="/acasa" /></rule><rule name="Redirect to www" stopProcessing="true"><match url="(.*)" /><conditions trackAllCaptures="false"><add input="{HTTP_HOST}" pattern="^goldnroll.ro$" /></conditions><action type="Redirect" url="{MapProtocol:{HTTPS}}://www.goldnroll.ro/{R:1}" /></rule><rule name="Redirect canonical to www" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_HOST}" pattern="^goldnroll.ro$" /></conditions><action type="Redirect" url="https://www.goldnroll.ro/{R:0}" redirectType="Permanent" /></rule><rule name="Redirect http to https and everything to www" patternSyntax="Wildcard" stopProcessing="true"><match url="*" negate="false" /><conditions logicalGrouping="MatchAny"><add input="{HTTPS}" pattern="off" /></conditions><action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" /></rule></rules><rewriteMaps><rewriteMap name="MapProtocol"><add key="on" value="https" /><add key="off" value="http" /></rewriteMap></rewriteMaps></rewrite>

But the only rule that works is the first one.

Any solution would be much appreciated.

Thank you,

Alexandru


Viewing all articles
Browse latest Browse all 3561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>