If you need to disable php on a directory with htaccess here is your script. Open up your text editor and paste this code in it.
<Files *.php>
deny from all
</Files>
Upload it to the directory that you do not want PHP code executed. Most folders that are hacked in WordPress are...
wp-content/uploads/
wp-includes
Upload this htaccess file to those directories for extra security.

Sign Up To Comment