custom server errors and wen.config

A

Adie

Hi, I have custom errors set in the web.config and am wanting to
redirect any bad url requests; 404 etc back to index.aspx

In web.config i have:
<customErrors mode="On" defaultRedirect="error404.aspx" />

which redirects to error404.aspx, then in error404.aspx I have:
<meta http-equiv="refresh" content="3;url=index.aspx"> which seems to
work fine if i mess with the url file name but not the file extension,
so if I typle "indx.aspx" the server will redirect back to index.aspx
but a request for "index.asp" causes a plain old 404 error.

Any ideas why this must be?
 
J

Jon Davis

Web.config is ASP.NET-only and is not handled when referencing a nonexistent
file or an ASP Classic or HTML file.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Custom Errors 4
Custom Error Pages 2
Custom http errors 2
customerrors page that errored and error? 1
CustomError Problem 4
custom errors... 2
HTTP 404 Redirect does not work 3
404 redirects not working 2

Top