Forum Moderators: phranque
just one domain?
i got this code but it wil block all sites ececpt from sites i added....
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://(www\.)?YourSiteName\.com/ [NC]
RewriteRule .*\.(gif¦GIF¦jpg¦JPG)$ [YourSiteName.com...] [R]
i want code the works the other way around ...
if i add domain then it can that domain name can not hotlink
is this posible as i only want to block one site
please post sample code
Thanks
RewriteCond %{HTTP_REFERER}^http://(www\.)?BlockedSiteName\.com/ [NC]
RewriteRule .*\.(gif¦GIF¦jpg¦JPG)$ [YourSiteName.com...] [R]
If my mod_rewrite rules/conds serves me correct.
Scott
RewriteCond %{HTTP_REFERER} ^http://(www\.)?BlockedSiteName\.com/ [NC]
RewriteRule \.(gif¦jpg)$ - [NC,F]
Note that the "¦" must be edited - Use the solid vertical pipe character from your keyboard.
Use of the [NC] flag makes the pattern test case-insensitive, and eliminates the need for both upper and lowercase patterns.
Reference: Introduction to mod_rewrite [webmasterworld.com]
Jim