ASP.Net Redirect rule for all except certain URL

deyuhost

New Member
I have the following redirect rules one is for non www url (http://mysite.co.uk/....) and the other is for a www URL to redirect to http://www.mysite2.co.uk/...Currently the rules are a catch all. I don't want the rules to execute if a certain URL is hit which contains "/mystring/mystring.aspx".Can anyone help me write the rules for this?\[code\] <rule name="Canonical Host Name - mysite" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^(?:www|[^.]+\.)*mysite\.co.uk$" /> </conditions> <action type="Redirect" url="http://www.mysite2.co.uk/{R:1}" redirectType="Permanent" /> </rule> <rule name="Canonical Host - mysite 2" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.mysite\.co.uk$" /> </conditions> <action type="Redirect" url="http://www.mysite2.co.uk/{R:1}" redirectType="Permanent" /> </rule>\[/code\]
 
Back
Top