Solved

asp.net redirect old pages

Posted on 2013-05-10
3
526 Views
Last Modified: 2013-05-10
Hi I have a large redirect page made up of eg
<add key="/acatalog/Crayons.html" value="/ProductSection/Crayons.aspx"/>
problem is that they had loads of queries they could have

eg  /acatalog/Crystal_Products.html?imz_s=pgten7msnkp6fl0ppp8p87c0a0

is they a way to match anything upto the "?" so inother words ingnore the query string and redirect it?

the redirect
  <rule name="Old Page Redirects" stopProcessing="true">
          <match url=".*"/>
          <conditions>
            <add input="{OldPages:{REQUEST_URI}}" pattern="(.+)"/>
          </conditions>
          <action type="Redirect" url="{C:1}" appendQueryString="false" redirectType="Permanent"/>
        </rule>
0
Comment
Question by:taz8020
[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
3 Comments
 
LVL 4

Expert Comment

by:bepsoccer1
ID: 39157121
change to
appendQueryString="True"
0
 
LVL 3

Author Comment

by:taz8020
ID: 39157132
hi tried that but think as its trying to match "/acatalog/Crystal_Products.html" if it has the query string it does not fire. It must be something in the pattern bit
0
 
LVL 4

Accepted Solution

by:
bepsoccer1 earned 500 total points
ID: 39157147
match conditions based on URL instead of URI.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

751 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