I'm using $_GET method like this
if($_GET['page']=="first") {include('pages/first.php');}
But how do 404 when user reach example.com/pages/first.php ? Thanks
I'm using $_GET method like this
if($_GET['page']=="first") {include('pages/first.php');}
But how do 404 when user reach example.com/pages/first.php ? Thanks
You can add a .htaccess file to your 'pages' folder with the following contents:
Deny from all
Please take note that this will prevent access to all files in this directory, so you should put your public files in a different directory.