Solved

Redirects not working...any ideas?

Posted on 2012-03-19
4
299 Views
Last Modified: 2012-03-19
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
0
Comment
Question by:Yashy
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 37737185
0
 
LVL 1

Author Comment

by:Yashy
ID: 37737261
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?
0
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 37737490
Try pattern with group:
filterValue=([a-z]*)\s([a-z]*)

Open in new window

Without group:
filterValue=[a-z]*\s[a-z]*

Open in new window

0
 
LVL 1

Author Comment

by:Yashy
ID: 37737684
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.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now