Im trying to do a 301 redirect as i have changed domains. Using windows server and im adding the following rule in web.config.
<rule name="redirectDomain" stopProcessing="true">
<match url="(.*)" />
<action type="Redirect" url="http://replacement-cost.net/{R:1}" redirectType="Permanent" />
<conditions logicalGrouping="MatchAny">
<add input="{HTTP_HOST}" pattern="^(www.)?windshield-replacement-cost\.org$" />
</conditions>
</rule>
This is working ok so far as all the pages are of the same name and file structure on the new site… except for the page that is the root of the old domain. that is now at http://replacement-cost.net/windshield-replacement-cost
is it possible to write another rule to redirect ONLY the root? while having the second rule redirect all the other pages? possibly some kind of execution ordering?
something to acheive the same result as this essentially
if ruleURLISROOT = true > goto http://replacement-cost.net/windshield-replacement-cost
else
redirect with code above
any help would be appreciated. its took me ages to just get this far! Thanks
This is new rule which should be added prior to your existing rule
This is your existing rule