Solved

asp.net redirect old pages

Posted on 2013-05-10
3
481 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
  • 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

747 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

12 Experts available now in Live!

Get 1:1 Help Now