dombrorj
06 Feb 2010, 08:05 PM
My image files are being hotlinked, and I'm trying to put a stop to it with the following .htaccess code. I can't figure out why it won't work though.
I've tried placing the file in the root directory and the image directory, and neither work. Strangely, I've tested other rewrite rules, and they work fine (non-www to www addresss, for example).
Am I missing something?
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ – [F]
Thanks for the help
I've tried placing the file in the root directory and the image directory, and neither work. Strangely, I've tested other rewrite rules, and they work fine (non-www to www addresss, for example).
Am I missing something?
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC]
RewriteRule \.(gif|jpg|png)$ – [F]
Thanks for the help