I am looking for a way to detect which page a user comes from (the users referring page). If the user does not come from a page called “index.php”, they should be redirected to a page, like, google.com. Any programming language that can be embedded into an html file. Thanks!
Share
you can get the previouse url by :
$_SERVER[‘HTTP_REFERER’]
in some cases this can be forbidden by the browser user settings
check it on the php manual
http://php.net/manual/en/reserved.variables.server.php