Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Redirects not working...any ideas?

Posted on 2012-03-19
4
Medium Priority
?
309 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
ID: 37737185
If space present in querysting that is wrong one.

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
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 2000 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

610 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