Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > custom server errors and wen.config

Reply
Thread Tools

custom server errors and wen.config

 
 
Adie
Guest
Posts: n/a
 
      01-27-2004
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?
 
Reply With Quote
 
 
 
 
Jon Davis
Guest
Posts: n/a
 
      01-27-2004
Web.config is ASP.NET-only and is not handled when referencing a nonexistent
file or an ASP Classic or HTML file.

Jon


"Adie" <> wrote in message
news: s.com...
> 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?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling errors using Custom Errors configuration settings in web.config jayeshsorathia@gmail.com ASP .Net 0 08-17-2012 08:08 AM
Out-of-memory errors and caching errors. George1776 ASP .Net 2 09-14-2006 03:34 PM
Obsolete Errors and Deprecated Errors using Dotnet Framework 2.0 SenthilVel ASP .Net 0 06-07-2006 11:48 AM
Internet Explorer causing errors/ slow internet speed and Outlook express errors Jeanne Medley Computer Support 2 02-11-2004 11:44 PM
Errors, errors, errors Mark Goldin ASP .Net 2 01-17-2004 08:05 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57