NoDirectPhpAcess.php: logout user when he tries direct url access to a php file
parent
12520a603f
commit
a753bdbafa
|
@ -2,6 +2,6 @@
|
||||||
// https://stackoverflow.com/questions/33999475/prevent-direct-url-access-to-php-file
|
// https://stackoverflow.com/questions/33999475/prevent-direct-url-access-to-php-file
|
||||||
if (!isset($_SERVER['HTTP_REFERER']) ) {
|
if (!isset($_SERVER['HTTP_REFERER']) ) {
|
||||||
/* choose the appropriate page to redirect users */
|
/* choose the appropriate page to redirect users */
|
||||||
die( header( 'location: index.php' ) );
|
die( header( 'location: logout.php' ) );
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue