Forum Moderators: coopster

Message Too Old, No Replies

Handling 404 error pages

Stripping the referrer URL?

         

Alioc

12:51 am on Sep 14, 2005 (gmt 0)

10+ Year Member



Hi,

On the page which I redirect visitors to, when the file they are looking for does not exist, I want to catch the referrer URL, then strip it down to the page name only.

Example:

http://www.example.com/folder/some-page-name.html

I want to grab the words "some-page-name" from that referrer URL.

Do you have any idea?

jatar_k

12:59 am on Sep 14, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you could use parse_url [php.net] and split the path portion on .

you could use one of the $_SERVER [php.net] vars and split it as well