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

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top