View previous topic :: View next topic |
Author |
Message |
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Thu Feb 28, 2008 5:35 am Post subject: Get URL of a not found page |
|
|
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 |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Thu Feb 28, 2008 10:37 pm Post subject: |
|
|
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 |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Thu Feb 28, 2008 11:08 pm Post subject: |
|
|
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 |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
|
Back to top |
|
|
rrinc -
Joined: 24 Feb 2006 Posts: 725 Location: Arkansas, USA
|
Posted: Fri Feb 29, 2008 1:30 am Post subject: |
|
|
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 |
|
|
|