Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI All

Please check my rewrite rule pasted below which working in given case . but i need to redirect many urls in a1.mydomain.com to http://www.newdomain.com/brand/static1.html.(mutilple pages to same page)

like this for a1.mydomain.com

i tried by adding one more input
<add input="{HTTP_HOST}" pattern="^a1.mydomain.com?act=order$">
but its not working . How to do this

<rewrite>
<rules>


<rule name="a1" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^a1.mydomain.com$" />
</conditions>
<action type="Redirect" url="http://www.newdomain.com/brand/static1.html" />
</rule>


<rule name="a2" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^a2.mydomain.com$" />
</conditions>
<action type="Redirect" url="http://www.newdomain.com/brand/static2.html" />
</rule>
</rules>
Thanks in Advance

What I have tried:

i tried by adding one more input
<add input="{HTTP_HOST}" pattern="^a1.mydomain.com?act=order$">
but its not working
Posted
Updated 28-Mar-16 1:22am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900