Re: HTTP 404 Redirect does not work
- From: Kevin Jones <kjonesNOSPAM@xxxxxxxxxxx>
- Date: Tue, 22 Aug 2006 09:56:47 +0100
> i believe, you need to map all the extensions to aspnet_isapi filter.
>
> check out this
> http://aspadvice.com/blogs/bmiller/archive/2004/10/22/2452.aspx for more
> details on the same.
Right - but you may not want to do that as it's only going to slow down the processing. You can change the default error handling properties in IIS, although this may not give you exactly what you want.
Go to the properties for the site, find the 'Custom Errors' tab and you can set a default error page there. Although this will only work (I believe) if the user has the browser configured to show the error page when a 404 is returned rather than showing the browsers specific 404 message. I'm not sure if you can configure IIS to redirect to a page when you get a 404 error, hopefully somebody else can answer that,
Kevin
Augustin Prasanna wrote:
mike,.
i believe, you need to map all the extensions to aspnet_isapi filter.
check out this http://aspadvice.com/blogs/bmiller/archive/2004/10/22/2452.aspx for more details on the same.
Regards,
Augustin
http://augustinprasanna.blogspot.com
"wwwmike@xxxxxx" wrote:
For some reasons my HTTP Redirect for 404 errors does not work for
certain files like .gif .jpg
on IIS Version: 5.1, but it works perfectly with the VisualStudio2005
internal webserver
****Web.Config****
.......
<customErrors mode="On" defaultRedirect="http://www.cnn.com">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.aspx" />
</customErrors>
.........
*******************
IIS 5.1
http://localhost/mywebsite/notExisting.gif ( does not work)
http://localhost/mywebsite/notExisting.aspx ( works!! , it also work
with *.html etc)
VisualStudio2005 Internal Server
http://localhost:1768/anonymousspeech/notExisting.gif (Works!!)
I guess I have to do some settings on IIS5.1. What do I have to do in
order to get proper redirects also for image file name like .jpg .gif
etc.
Thanks for helping
- Follow-Ups:
- Re: HTTP 404 Redirect does not work
- From: wwwmike
- Re: HTTP 404 Redirect does not work
- References:
- HTTP 404 Redirect does not work
- From: wwwmike
- HTTP 404 Redirect does not work
- Prev by Date: Re: If Statement in HTML
- Next by Date: Re: App domain recycling issue in 2.0 but latest VS2003 SP1 seems to fix it - why?
- Previous by thread: HTTP 404 Redirect does not work
- Next by thread: Re: HTTP 404 Redirect does not work
- Index(es):
Relevant Pages
|