Yashy
asked on
Redirects not working...any ideas?
Hi guys,
We're using IIS7.
We need to redirect http://www.domain.com/one/two/three/four?addFilter=five&filterValue=six seven
to http://www.domain.com/four/six-seven?showproducts=true
Having problems with the whitespace %20 on URL between six and seven
<rule name="PatternRedirect" stopProcessing="true">
<match url="one/two/three/four.*" />
<conditions trackAllCaptures="true">
<add input="{QUERY_STRING}" pattern="filterValue=([a-z ]+)\s*([a- z]+)" />
<add input="{HTTP_HOST}" pattern="domain.com$" />
</conditions>
<action type="Redirect" url="http://domain.com/womens/{C:1}-{C:2}" redirectType="Permanent" />
</rule>
Tried \s* and [\s*] and (%20|\s*) none seem to work,
Any ideas?
Thanks
Yashy
We're using IIS7.
We need to redirect http://www.domain.com/one/two/three/four?addFilter=five&filterValue=six seven
to http://www.domain.com/four/six-seven?showproducts=true
Having problems with the whitespace %20 on URL between six and seven
<rule name="PatternRedirect" stopProcessing="true">
<match url="one/two/three/four.*"
<conditions trackAllCaptures="true">
<add input="{QUERY_STRING}" pattern="filterValue=([a-z
<add input="{HTTP_HOST}" pattern="domain.com$" />
</conditions>
<action type="Redirect" url="http://domain.com/womens/{C:1}-{C:2}" redirectType="Permanent" />
</rule>
Tried \s* and [\s*] and (%20|\s*) none seem to work,
Any ideas?
Thanks
Yashy
ASKER
There's no option to change the querying string. These links are out there and therefore we need to work out a way to ccapture six and seven as separate parameters and then use them to redirect to the target/ destination Url as in the above example.
tried to use \s* or %20 but neither seem to work. Any suggestions?
tried to use \s* or %20 but neither seem to work. Any suggestions?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It ended up being the ordering of the patterns. One pattern was kicking in before the other and causing a problem with the redirect. The ordering has now been changed again.
Thanks for your help dude.
Thanks for your help dude.
Replace
http://www.domain.com/one/two/three/four?addFilter=five&filterValue=six seven
with
http://www.domain.com/one/two/three/four?addFilter=five&filterValue=six&filterValue=seven
Please do refer below link. http://stackoverflow.com/questions/5218452/passing-more-then-one-value-with-the-querystring-with-the-same-id