View Full Version : 404 and 500 Custom Error Pages
ubelt
04-06-2004, 07:15 AM
I have created custom 404 and 500 Error Pages.
I wanted to capture the page's URL where 404/500 error occured. I tried using Request.ServerVariables(HTTP_REFERER) but it is getting an empty string.
Is there any way to get the page's URL?
Thanks.
Aristotle
04-07-2004, 12:08 AM
The custom 404 ASP page should be able to get the referer value. I just tested it on my site. You do need the HTTP_REFERER in quotes.
ubelt
04-07-2004, 08:38 AM
Lukas,
I do have it in quotes.
Here's my code:
<p><%=Request.ServerVariables("HTTP_REFERER")%></p>
<p>Page Not Found</p>
I'm still getting an empty string.
ubelt
04-07-2004, 08:46 AM
I got it wrong when I was testing it. I was entering the invalid URL at the browser instead of clicking. That's why the HTTP_REFERER is empty.
However, when I tried clicking an Invalid URL, the value I'm getting for HTTP_REFERER is the page where I clicked the URL. I was hoping to get the Invalid URL itself.
Aristotle
04-08-2004, 02:57 AM
The QUERY_STRING value should give the broken link URL.
vBulletin® ©Jelsoft Enterprises Ltd.