Ok so i have a directory in my root folder called /pages in which i keep all my pages that i include thru index.php
What I wonder is would could i somehow return a 404 error if someone requests it? i dont like snoopy people...
Ok so i have a directory in my root folder called /pages in which i keep all my pages that i include thru index.php
What I wonder is would could i somehow return a 404 error if someone requests it? i dont like snoopy people...
Is there any way you can re-structure your app so that those pages are outside the document root? Much better answer...
Absolutely put the data outside the web root as gahooa says.
If that's totally impossible due to provider restrictions, then put a .htaccess with the following contents into the directory:
deny from all
that should block all requests to files in that directory and return a "401 forbidden".
Try this rule:
RewriteRule ^pages($|/) - [L,R=404]
But the R=404
flag does only work since Apache 2.