Prevent Script Execution

You can disable scripts being run in the directory of your choice by adding the following code to your .htaccess file in that directory:

Options -ExecCGI
AddHandler cgi-script .php .php3 .php4 .php5 .phtml .pl .py .jsp .asp .htm .html .shtml .sh .cgi .xml

You can replace the file types in the example with the file types you wish to disallow.

This would be particularly useful if you allow visitors to upload files to your server, but want to be sure that any potentially harmful files they upload are not allowed to execute.