I'm running Apache 2 on a Win32 platform, and I can't seem to get hotlink protection working.
I've uncommented "LoadModule rewrite_module modules/mod_rewrite.so" in the .conf file and restarted apache, and I have AllowOverride All in my httpd.conf. .htaccess does work fine, as I am able to set options in it and it works fine.
Now when I'm trying to make an .htaccess to prevent hotlinking, it doesn't do anything. In it is:
Please help.
I've uncommented "LoadModule rewrite_module modules/mod_rewrite.so" in the .conf file and restarted apache, and I have AllowOverride All in my httpd.conf. .htaccess does work fine, as I am able to set options in it and it works fine.
Now when I'm trying to make an .htaccess to prevent hotlinking, it doesn't do anything. In it is:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://my_domain/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.my_domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://my_ip_address/.*$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp|rep|rar|zip|w3g).*$ - [G,L]
Please help.