Image Directory Security with htaccess

Image DirectorySome hackers or attackers try to upload script files in image upload files and they can see and change your files with that script. You can block this type file in that directories. You can forbidden type of files and close execution of CGI.

.htaccess

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

From: http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/#sec16

Share and Enjoy:
  • StumbleUpon
  • Digg
  • TwitThis
  • FriendFeed
  • del.icio.us
  • MySpace
  • Technorati
  • Facebook
  • Google Bookmarks
  • Live

Enjoy this article?

Consider subscribing to our RSS feed!

Share us Facebook, FriendFeed, Digg

Liked by

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

2 Comments

  1. fredy
    07:28 on June 21st, 2009

    thanks

  2. rif
    07:03 on September 25th, 2009

    pls how to Stop Image Hotlinking with .htaccess ?

Sorry, the comment form is closed at this time.

Oyun