Block access to .zip, .exe and more



Hire Us!Download Video(0)Comments
Need Jobs done? Use our brand new Jobs Board to get your projects done at affordable prices.

I know bandwidth is precious and for some people it's very limited. You have great images and download but you are worried about people linking to them and illegally downloading your files. This tutorial will help you if you have mod rewrite turned one.[ in a lot of cases it's already turned on for you hosted site ]

Steps
Create a .htaccess [ if you do not know how to create one it's basically creating a text file and save it and rename to .htaccess ]. Place the following code inside the .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?
yoursite.com/.*$ [NC]
RewriteRule \.(zip|exe)$
http://yoursite.com/donotsteal.php[R,L]

As you can see texts in green needs to be changed to match your domain. The first one ( yoursite.com } needs to be your main domain eg. www.westernstudios.net. Change ( http://yoursite.com/donotsteal.php ) to a page that people will see when they click a link to your download from another web site. Save and place inside the folder with the zip or exe file.

Note: You can also change zip and exe to jpeg and gif to protect images files.

Visit our forums for more help!


Hire Us!Download Video(0)Comments
Need Jobs done? Use our brand new Jobs Board to get your projects done at affordable prices.