Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Redirect dynamic url / Webconfig file

$
0
0

Hi All,

I'm looking to redirect  old urls /blog/?p=13 (the number varies) to a static page..I'm looking to place this code in my webconfig file..

the regex I've used to capture this is..^blog\/?p=[0-9]$

and the code I use to place this in the webconfig file...

<rewrite>
<rules>
<rule name="Blog Redirects" stopProcessing="true">
<match url="^blog\/?p=[0-9]$" />

<action type="Redirect" url="redirect url" redirectType="Permanent"/>
</rule>
</rules>
</rewrite>

Obviously the redirect isn't working, any pointers would be very much appreciated..

Thanks

Darren


Viewing all articles
Browse latest Browse all 488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>