Forum Moderators: phranque
Any help would be appreciated. I currently have the following .htaccess but URLs to *.php are not being sent a 404, the URL still gets through to the doc.
RewriteEngine on
RewriteCond %{THE_REQUEST} ^(GET¦HEAD)\ /.+\.php\ HTTP
RewriteRule \.php$ - [F]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)/?$ /$1.php [L]
For now, I've renamed all my PHP files with names that people will find it hard to guess and then I have some mod-rewrite rules that take URIs with .html and redirect them to the appropriate PHP URI. Of course accessing my .htaccess is also verbotten.
As long people don't try to guess the PHP filenames, is this foolproof?
[us4.php.net...]