Menu Close

How to Prevent PHP, Perl Executable scripts Run in your Image Folder with .htaccess file

Sometimes  you donot need to run php code in all your folder such as your image folder. In your Image folder, add following codes:

order allow,deny
 deny from all

# secure directory by disabling script execution
 AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
 Options -ExecCGI

Above codes will deny all .php, .pl, .py, .jsp, .asp, .htm, .shtml, .sh,.cgi to run in your image folder.

Related Posts