This blog site is not meant to be any information that is distributed to the general public. It is to serve as shared documentation between the DNSTC developers; however, if you find something useful and would like to use it, go right ahead.

Tuesday, February 23, 2016

Securing the Images Folder

It is required to secure any folder that has rights for uploading with locking it down so that coding cannot execute within the folders and subfolders of that directory structure.   The following code should be placed within an .htaccess file at the root of any folder that has access to upload or create files on the server.

.htaccess files can be placed anywhere within a folder structure, and you need to have knowledge of Appache web server in order to construct them.   By placing the following code within and .htaccess file, this will prevent the execution of any .php file with the exception of index.php.

 <Files *.php>  
   deny from all  
 </Files>  
 <Files "index.php">  
   Order Allow,Deny  
   Allow from all  
 </Files>  

1 comment:

  1. Well securing the images folder was never easy before, But as I read this great article I'm very delighted to found this guide. Thanks for sharing this easy method of securing the images folder. Keep up the great work!

    8 Stand-Out Funeral Homes Website Design from 2016 that have people talking.

    ReplyDelete