Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 559
  • Last Modified:

asp.net redirect old pages

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
taz8020
Asked:
taz8020
  • 2
1 Solution
 
bepsoccer1Commented:
change to
appendQueryString="True"
0
 
taz8020Author Commented:
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
 
bepsoccer1Commented:
match conditions based on URL instead of URI.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now