I’m trying to disable all scripts from running in a directory and all of its children. I think the fact that I’m a legacy PHP4 user may be complicating things. I’ve got the following in the .htaccess file for the top directory of the directory tree where I want script execution disabled:
RemoveType application/x-httpd-php .php
AddType text/plain .php
RemoveHandler cgi-script .cgi .pl .py .php
RemoveHandler php-cgi .php4 .pcgi4 .php
RemoveHandler php5-cgi .php
I’ve had a few back and forth emails with support over the last couple of days and adding the AddType line is the latest suggestion from support, which had no effect.
Has anyone had any success with disabling scripts from running in specific directories using .htaccess?