Jump to content


Photo

Custom Error Page


  • Please log in to reply
3 replies to this topic

#1 master82

master82
  • Members
  • PipPipPip
  • Advanced Member
  • 182 posts

Posted 08 September 2006 - 10:54 AM

Im thinking of creating my own custom error page (error 401, 404 etc) and know how easy it is to set these up. But what i was hoping to add to the 404 (or at least i think its the 404 error) is to find out what page the user typed in. so...

...is it possible to copy what was entered into the address bar and store it into the database?

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 September 2006 - 10:59 AM

To get where the user intended to go use $_SERVER['HTTP_REFERER'].

#3 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 08 September 2006 - 11:00 AM

It's not reliable though :)

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 08 September 2006 - 11:03 AM

Prehaps you can use $_SERVER['REQUEST_URI']

$_SERVER['HTTP_REFERER'] and $_SERVER['REQUEST_URI'] is the only variables which store where the user can from, or for the file the user has requested respectively.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users