Get URL of a not found page

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Thu Feb 28, 2008 5:35 am    Post subject: Get URL of a not found page Reply with quote

I have a custom error page and I'd like to get the URL of the page that wasn't found for logging. Is it possible to get the page's URL that wasn't found? The URL changes to the URL of my 404 page so I can't get the URL of the actual page that wasn't found. My 404 page is a script that I want to process errors and log them.
_________________
-Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados.
Back to top View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Thu Feb 28, 2008 10:37 pm    Post subject: Reply with quote

Your 404 error script must be performing a redirection.

Quote:
GET /bla.htm HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/msword, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
Host: pksml.net
Connection: Keep-Alive

HTTP/1.1 404 Not Found
X-Powered-By: PHP/5.1.2
Local-Time: Thursday, February 28, 2008 - 16:35:48 (EST)
Content-type: text/html
Connection: Close
Date: Thu, 28 Feb 2008 21:35:44 GMT
Server: Abyss/2.4.0.3-X2-Win32 AbyssLib/2.4.0.3


No redirection here. Just use $_SERVER['REQUEST_URI'] to get requested page.

Of course, you could just make a script that will search for 404 in your access.log and display all URLs at once.
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Thu Feb 28, 2008 11:08 pm    Post subject: Reply with quote

The problem was that I used a URL and not a path so it was redirecting to the URL. My 404 page

Edit: Does anyone know how to get around IE's error pages?
_________________
-Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados.
Back to top View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Fri Feb 29, 2008 12:42 am    Post subject: Reply with quote

rrinc wrote:
The problem was that I used a URL and not a path so it was redirecting to the URL. My 404 page

Edit: Does anyone know how to get around IE's error pages?


Fixed, I presume?

#2: See http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml

Nice error page BTW :)
_________________
Stephen
Need a LitlURL?


http://CodeBin.yi.org
Back to top View user's profile Send private message Visit poster's website
rrinc
-


Joined: 24 Feb 2006
Posts: 725
Location: Arkansas, USA

PostPosted: Fri Feb 29, 2008 1:30 am    Post subject: Reply with quote

pkSML wrote:
Fixed, I presume?

#2: See http://www.404-error-page.com/404-error-page-too-short-problem-microsoft-ie.shtml

Nice error page BTW :)

Yeah I fixed it.

Glad you like the error page. :) Added the doctype and it exceeds 512 bytes now.
_________________
-Blake | New Server :D
SaveTheInternet
Soy hispanohablante. Puedes contactarme por mensajes privados.
Back to top View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group