Stopping Hotlinking with .htaccess! URGENT!

Status
Not open for further replies.

g1c9

Narcissist
Jun 26, 2006
1,317
58
0
MERICA
Please help!

I am trying to prevent hotlinking with an anti-hotlinking image but it isn't working.

Any ideas on how to fix? I am only worried about the /content/ folder.

Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?lunchbreaker\.com [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} ^http://.*$
RewriteRule \content\.(jpe?g|gif|bmp|png|mpe?g|wmv|avi|txt)$ http://www.lunchbreaker.com/hotlinker.gif [L]
 


g1c9 said:
Please help!

I am trying to prevent hotlinking with an anti-hotlinking image but it isn't working.

Any ideas on how to fix? I am only worried about the /content/ folder.
via this link: http://altlab.com/htaccess_tutorial.html

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]

hope that helps.
 
Status
Not open for further replies.