htaccess Tutorials [Anti Leech]

All the CGI antileech does it hide links. This will allow you to actually use the real links on your site. But if someone tries to click a link that file, and the link wasn't on your site, then they will be redirected. The downside to this is that people can't right click and save target as on MP3's.

Well just paste the following code into notepad:
AuthUserFile /dev/null
AuthGroupFile /dev/null

RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://yoursite.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.yoursite.com/ [NC]
RewriteRule /* http://www.yoursite.com/ [R,L]

(Replace the URL on the last line with the page you want me people be redirected to if they try to leech).

Save it with file name as .htaccess, and the file type as All Files.

Now you have to be careful where you upload this, I would only upload this into the directory with your downloads in it. It must be uploaded in ASCII.

If it didn't work, then you saved the file as .htaccess.txt , didn't upload the file in ASCII, may need to CHMOD it to 644, or your host straight up doesn't support it.

If you find this information inaccurate or have questions post in the forums