stopping hotlinking
I'm having a bit of trouble getting my .htaccess setup to stop hotlinking using mod_rewrite. I've followed a few threads on here, and even used some code generators on the 'net, but cannot seem to get it working.I need to block hotlinking of the following file types: gif, jpg, mov, mpg, mpeg, wmv
The code I'm trying to use is:
Code:
RewriteEngine on RewriteBase / RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://domain.org/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://www.domain.org/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://xx.xx.xx.xx/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://domain.org/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://www.domain.org/.*$ [NC] RewriteCond %{HTTP_REFERER} !^https://xx.xx.xx.xx/.*$ [NC] RewriteRule .*\.(gif|GIF|jpg|JPG|mov|MOV|mpg|MPG|mpeg|MPEG|wmv|WMV)$ - [F,L]
When I load my main page after implementing this code I get:
Forbidden
You don't have permission to access / on this server.
You don't have permission to access / on this server.
Anyone got any ideas why this is happening? I'm a somewhat beginner at this stuff. Never really used mod_rewrite before. I've tried a few different variations of the above code, all with the same results.
I confirmed that mod_rewrite is a loaded module (it was listed in a phpinfo). OS is RH 7.1