Re: HTTP 404 Redirect does not work

Tech-Archive recommends: Fix windows errors by optimizing your registry



> 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


.



Relevant Pages

  • Re: IIS Extensions in URL causes filter to break.
    ... If your filter operates the way you say, ... IIS can only say that one or more of the events contain ... every request, and maybe more than once, depending on whether the URL causes ... As for the order of handling between ISAPI Extensions and Filters - Filters ...
    (microsoft.public.inetserver.iis.security)
  • Re: where is it hiding?
    ... processed without the filter loaded. ... The messages that you see in the UrlScan log are just there to indicate when ... Assuming that a filter is properly installed, it is possible for IIS to fail ... fail to load the filter prior to calling any entry points (due to ...
    (microsoft.public.inetserver.iis.security)
  • Re: IIS Extensions in URL causes filter to break.
    ... I delete all cached files at the browser to ensure that the browser ... I confirmed using NetMon on IIS server that the static HTML is ... What my filter does exactly? ... It filters every incoming request looking for "mystring" inside it. ...
    (microsoft.public.inetserver.iis.security)
  • Re: front page 2003 running on small business server 2003 r2 issue
    ... IIS Manager, and then populate it with a Front Page Web Site? ... Ron Symmonds advises first installing Server Extensions to ...
    (microsoft.public.frontpage.programming)
  • Re: Publish to localhost
    ... IIS, then select your default web, right click, All Task, and tell me what options you see. ... I would like to uninstall PWS but I can't find a place that will do that. ... personal web server but nothing. ... >> You need to remove the PWS and then use IIS and the FP2000 extensions that come with IIS. ...
    (microsoft.public.frontpage.extensions.windowsnt)