404 Redirect Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: DanTg (dan_at_danceholidays.com)
Date: 11/29/04


Date: 29 Nov 2004 03:44:01 -0800

Hi all,

I want to build a custom 404 error page that using asp will
dynalically build the page.

Here is my problem. I am building a directoy website which has over
3000 categories. I do not want to create a category page for each one
so I though I would try and cheat a little and use the 404 to make it
look as if the page exists and put out the relevant information.

The website is:
http://www.pricerequest.co.uk/

The page I am linking to (which does not really exist) is:
http://www.pricerequest.co.uk/a/Cars_Motorbikes.html

The page you see when you go to
http://www.pricerequest.co.uk/a/Cars_Motorbikes.html is actually the
404 page.

So what I want it to do is the 404 page ASP code will look at the page
name 'Cars_Motorbikes' search the categories database table and pull
out the category information.

So in IIS I tried setting the Custom Errors 404 Message Type as File
but IIS does not or I can't get this page to process it as ASP to then
dynamically build the page.

The 2nd thing I tried was setting the Message Type as URL. This works
but the URL string looks like:

http://www.pricerequest.co.uk/a/category.asp?404;http://www.pricerequest.co.uk/a/Cars_Motorbikes.html

When really I want the URL to look like:

http://www.pricerequest.co.uk/a/Cars_Motorbikes.html

Does any one know how I can do this in IIS? Is there any external
filters, executables that can make IIS do this?

Thanks,

Dan Chapman



Relevant Pages

  • Re: Supressing Public ASP Error Codes
    ... Please read the IIS documentation on custom error pages, ... specific internal server error caused by an ASP related error. ... IIS will send this error page to the client, rather than the existing page + ... following error message that was displayed at the bottom of the ...
    (microsoft.public.inetserver.iis.security)
  • Re: Supressing Public ASP Error Codes
    ... Create your own custom 500-100.asp error page. ... Customise your website in IIS, so that the 500-100 error page points to your ... I am not a literate ASP programmer and the ...
    (microsoft.public.inetserver.iis.security)
  • Re: Supressing Public ASP Error Codes
    ... IIS will transfer control to whatever is ... The website has numerous ... Create your own page that you would like displayed to users when an ASP ... Then configure IIS to use that page by changing the custom ...
    (microsoft.public.inetserver.iis.security)
  • Re: global.aspx Application_error does not fire on anything other than
    ... Another option is to simply set a custom page for 404 errors in IIS. ... Remember, .aspx files go through the ASP.NET ISAPI application; html, asp, etc. files don't. ...
    (microsoft.public.dotnet.framework.aspnet)
  • 404 Redirect Question
    ... I am building a directoy website which has over ... So what I want it to do is the 404 page ASP code will look at the page ... So in IIS I tried setting the Custom Errors 404 Message Type as File ...
    (microsoft.public.inetserver.asp.general)