Hotlink Protection – Multi Site
-
Hello,
I would like to set a hotlink protection (via htaccess) but need your help.
There is a long article (http://perishablepress.com/creating-the-ultimate-htaccess-anti-hotlinking-strategy/) where I found 2 nice codes. Here they are:# ultimate hotlink protection <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png)$ [NC] RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?domain\. [NC] RewriteRule \.(gif|jpe?g?|png)$ - [F,NC,L] </ifModule> # hotlink protection via stupid htaccess tricks <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain\.tld/.*$ [NC] RewriteRule .*\.(gif|jpg)$ http://www.domain.tld/eatme.jpe [R,NC,L] </ifModule>
QUESTIONS:
Could you pls connect them to get this:
1) Not [anything].domain.[anything] but [anything].domain.com
2) This should work for domain mapped also (for sub-sites).
3) The result of the “theft” should be one definite picture (http://domain.com/image-stop-hotlinking.jpg).
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Hotlink Protection – Multi Site’ is closed to new replies.