Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

Returning a 410 code using a rewrite map

$
0
0

Hello

I'm trying to use a rewrite map to return 410 codes for some pages that don't exist anymore.

I can't get it working presumably because of my syntax. This is what i have:

<rule name="Return410" enabled="true" stopProcessing="true"><match url=".*" /><conditions><add input="{Static410:{REQUEST_URI}}" pattern="(.+)" /></conditions><action type="CustomResponse" statusCode="410" subStatusCode="0" 
statusReason="Gone" statusDescription="Gone" /></rule><rewriteMaps><rewriteMap name="Static410"><add key="/page-that-is-gone" value="" /></rewriteMap></rewriteMaps>

What am i doing wrong?

I could just say to hell with it and return a 301 to another page of my choosing (map to a 301 works fine).

Thanks

Paul


Viewing all articles
Browse latest Browse all 2482

Trending Articles



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