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.

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

See also  Stop to Browsing of Directory By Htaccess File and Cpanel
  • You must be logged in to reply to this topic.