Reputation: 121
I want to prevent direct access to php files to prevent bot attack
It is completely shut down with the following htaccess code. it didn't work for me
RewriteEngine on
RewriteCond %{THE_REQUEST} \.php[\ /?].*HTTP/
(.*)\.php$ /index.html [L]
Upvotes: 0
Views: 221
Reputation: 496
If you want that just the server has access to your php files you can use this:
<Filesmatch "\.(php)$">
Require local
</FilesMatch>
Upvotes: 1