CODE
if ($_SERVER['HTTP_REFERER'] !== $referer) {
if( $_SERVER['HTTP_REFERER'] !== "http://mysite.com/admin.php") {
header("Location: http://mysite.com/somewhereelse/"); exit;
}
}
The reason for this line:
CODE
if( $_SERVER['HTTP_REFERER'] !== "http://mysite.com/admin.php")
is to make navigating possible once I can enter the page with the url http://mysite.com/admin.php. However, it's still impossible because the actual url will be like this: http://mysite.com/admin.php?act=xyz So the referer check will not allow me to navigate in the admin page, I will be redirected to http://mysite.com/somewhereelse/
How can make the referer check allow all the referer beginning with http://mysite.com/admin.php like http://mysite.com/admin.php?act=xyz or http://mysite.com/admin.php?address=whatever... I should use wildcard or sth? How?
Please help me, I need this very much (although I do have a login check in the admin page).
Thanks in advance.