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>
LVL 3
taz8020Asked:
Who is Participating?
 
bepsoccer1Connect With a Mentor Commented:
match conditions based on URL instead of URI.
0
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.