Forum Moderators: coopster

Message Too Old, No Replies

Custom error page

Quick question

         

Rex_Fenris

9:26 pm on Jul 5, 2005 (gmt 0)

10+ Year Member



Is there a way with PHP to get the URL of the page you were previously on?

For my custom 404 error page I want to be able to display what the URL was that wasn't found.

Thanks.

jatar_k

9:33 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



it may be available with $_SERVER['HTTP_REFERER'] but you would have to test it

Span

9:43 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My 404 uses $_SERVER['REQUEST_URI'] but you would have to test it

jatar_k

9:44 pm on Jul 5, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



good point, take a look through the server vars

[php.net...]