I'm working on a custom 404 which provides suggested links based on the page being sought.
My question is in 2 parts:
1. When I try and set an ASP page to be a custom 404, the html appears as text on the rendered page. Why is this and can I fix this. Is it possible to have an ASP page as a custom 404. Web Server is IIS6. I wanted to suggest links (sourced from a DB) based on the page address causing the 404 <% =( "http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") )%>.
2. Whilst working around the problem mentioned above, I have made a .htm page the custom 404 and am using it to manually link to the ASP page to list possible suggested links (sourced from a DB) based on the referer <% = request.ServerVariables("HTTP_REFERER") %>. This introduces another click. I have tried used a meta tag refresh and seperately a javascript redirect to get the .htm page to take you to the ASP page, but the referer is not included. Is there a way around this. Will a response.redirect achieve this?
Hope someone can help with either/both problem(s).
Cheers.