writing .htaccess files in windows http://www.techpavan.com/2009/01/16/cre ... s-windows/
You can make an .htaccess file with a text editor and use the following commands to stop these two companies and others from stealing your files and bandwidth:
Code: Select all
<Files *>
Header set Cache-Control: "private, pre-check=0, post-check=0, max-age=0"
Header set Expires: 0
Header set Pragma: no-cache
</Files>
AddDefaultCharset utf-8
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !http://(www.)?supercala.net/.*$ [NC]
RewriteRule \.(avi|mp3|js|css)$ - [F]
RewriteCond %{HTTP_REFERER} abmp3\.com [NC,OR]
RewriteCond %{HTTP_REFERER} beemp3\.com
RewriteRule .* - [F]
remember to replace supercala.net with your website name, abc.com, myportfolio.com, videoart2011.com, etc, whatever it is. You can also add new lines of blocking for each site you find out that is stealing your data with this line repeated and changed:
Code: Select all
RewriteCond %{HTTP_REFERER} beemp3\.com
The rewrite rule allows you to block file types from being stolen from new, unknown sites that you haven't tracked yet. If you like to post on social networking sites, don't block [jpg] for instance, then you couldn't hotlink your image to share. photography sites for entertainment would probably want to block sub folders, but keep a few open to share to get people interested in the site itself.
The first set of code lines allows shared servers to instantly show differences as you are programming your site instead of waiting for the cache to refresh every 5-30 minutes, making tweaking a website and seeing the changes very confusing. For the best speed, you should take these lines out if you have a non-changing site (which isn't good, the web likes to change):
Code: Select all
<Files *>
Header set Cache-Control: "private, pre-check=0, post-check=0, max-age=0"
Header set Expires: 0
Header set Pragma: no-cache
</Files>