How to stop hotlinking with www and without www
-
Trying to block hotlinking for both “mydomain.com” and “www.mydomain.com”. My code does not block hotlinking from “mydomain.com”.
My current .htaccess code is:
<IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^https://(www.)?mydomain.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !google. [NC] RewriteCond %{HTTP_REFERER} !search?q=cache [NC] RewriteCond %{HTTP_REFERER} !msn. [NC] RewriteCond %{HTTP_REFERER} !yahoo. [NC] RewriteRule .*.(gif|jpg|png|ico)$ – [F,L] </ifModule>
What can I add to block hotlinking images from “mydomain.com” without the “www”?
Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to stop hotlinking with www and without www’ is closed to new replies.