Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Cannot redirect 404 - setting issue?

Reply
Thread Tools

Cannot redirect 404 - setting issue?

 
 
Greg Collins [Microsoft MVP]
Guest
Posts: n/a
 
      10-02-2006
ASP.NET 2.0: I am trying to do a redirect for a non-existing file:

web.config:

<location path="sitemap.xml">
<system.web>
<customErrors mode="On" defaultRedirect="~/RedirectSiteMap.aspx">
<error statusCode="404" redirect="~/RedirectSiteMap.aspx" />
</customErrors>
</system.web>
</location>


I cannot get this to work. Others have said they can get it to work. It fails for me both on localhost and on remote server (webhost4life). The site-global version of the customErrors defaultRedirect works just fine... just not any other ones.

What am I possibly missing that is preventing this from working? Is there some IIS setting I might be missing? Is there something I'm overlooking?

--
Greg Collins [Microsoft MVP]
Visit Brain Trove ( http://www.BrainTrove.com )


 
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
HTTP 404 Redirect does not work wwwmike@gmx.ch ASP .Net 3 08-23-2006 06:50 AM
Redirect to 404error page YET return 404 Status Code Pat Carden ASP .Net 7 11-20-2005 04:21 AM
how to redirect 404 error to custom error page? strutsng@gmail.com Java 3 10-14-2005 11:47 AM
Intercept IIS 404 errors? Issue with Viewstate and 404 Jonathan Folland ASP .Net 2 03-17-2005 02:32 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM



Advertisments