Sign in to follow this  
Followers 0

Securing Files and Directories


Nabeel
Securing Files and Directories


  Report
Sign in to follow this  
Followers 0
Go to Administrator Guide


User Feedback


To stop leaching of your image files add this to the same file.

#disable hotlinking
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?PUT YOUR DOMAIN HERE/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?forum.phpvms.net/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?va-list.com/.*$ [NC]
RewriteRule \.(gif|png|jpg|js|css)$ - [F,NC]

Explained put your domain here is your website address, leave the ? so ?somedomain.com

If you want to allow other domains like i have then simply add them to the exception list.

phpvms and va-list.com, you can add as many as you like. :)

Share this comment


Link to comment
Share on other sites

If anyone wants suggested HTACCESS file, This is the one for the best security so you won't have sneakers in your files.....

# main page of the site
DirectoryIndex index.php

# prevent viewing of a specific file
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$">
Order Allow,Deny
Deny from all
</FilesMatch>

# prevent viewing of index
Options -Indexes

Share this comment


Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now