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]
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]
If you want that just the server has access to your php files you can use this:
<Filesmatch "\.(php)$">
Require local
</FilesMatch>