Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing address

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

I have a php page as my error 404 page which is supposed to find out where the visitor was wanting to go and redirect them to the appropriate new page with switch statement.

When I use $PHP_SELF it gets the address of the error page, however, I need it to get the intended address of the visitor (ie.. the link they clicked in the search engine)

Thanks.
 
try using some javascript with your PHP.. using the history.back() method you could open a new window, then pull the address from it.. and pass that to a hidden form element in you 404 page.. or just use javascript to re-direct them with a little document.location.replace("i know this is kinda the easy way out.. but it'll work :)
Siberd
mail: siberdude@ntlworld.com
ICQ: 44167565
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top