Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

URL Rewrite gives 500.50 error for 401 URLs

$
0
0

I'm trying to trap 401 errors that are returned when people try to access files in certain directories on the server (win 2008 iis 7.5).

With no web.config, the user sees a 401 as expected.

I am trying to trap and redirect this error but not having any luck. Getting a 500.50 error instead.

Here's my web.config, which works well in all other respects.

What am I doing wrong?

Thanks for any reply

<?xml version="1.0" encoding="UTF-8"?><configuration><system.webServer><rewrite><rules><rule name="Imported Rule 1" stopProcessing="true"><match url="^(.*)$" ignoreCase="true" /><conditions><add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" /><add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" /><add input="{URL}" pattern="^/favicon.ico$" ignoreCase="true" negate="true" /></conditions><action type="Rewrite" url="/index.cfm?RW404={R:1}" appendQueryString="true" /></rule></rules></rewrite><httpErrors errorMode="Detailed"><remove statusCode="401" /><error statusCode="401" prefixLanguageFilePath="c:\website" path="error.htm" /></httpErrors></system.webServer></configuration>




Viewing all articles
Browse latest Browse all 27852

Trending Articles



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