Forum Moderators: phranque
in the file it just has this text:
SetEnvIf Referer mysitesname\.com ALLOW
order allow,deny
allow from env=ALLOW
deny from all
yet i'm still seeing a lot of hotlinking, particularly from online forums
am i doing something incorrectly?
thanks!
2) Your code, if it worked, would stop not only 'hotlinking' but *all linking.* The referrer denial makes no distinction between people linking to your media (hotlinking) and people linking to your pages.
3) And it would stop linking for all domains, including your own, because the Order [httpd.apache.org] directive is incorrect.
For a start, I'd suggest:
<FilesMatch "\.(gif¦jpg)$">
SetEnvIf Referer mysitesname\.com ALLOW
SetEnvIf Referer ^$ ALLOW
# Include the next line if you use custom 403 pages:
SetEnvIf Request_URI ^/path_to_your_custom_403_page\.html$ ALLOW
Order Deny,Allow
Allow from env=ALLOW
Deny from all
</FilesMatch>
Note that this also allows blank referrers, so that people behind corporate or ISP cahcing proxies (e.g. all AOL users) won't be blocked.
Jim
I've saved and uploaded the ".htaccess" file without the extension (the icon changed as well, i assume this is normal), replaced the broken pipe with a solid one and also deleted the lines about the 403 pages, mostly because I assume if I don't know what they are then I probably don't have them no?
Now It's uploaded to my root directory and we shall see from there?
I am still seeing a hotlinked picture showing on a forum site though.
Thanks again,
-L
i put this code in my .htaccess, but it blocked the entire site from the internet!
RewriteEngine On
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mysite\.com/ [NC
RewriteCond %{HTTP_REFERER}!^$
RewriteRule \.(jpe?g¦gif¦bmp¦png)$ - [F]
is there anyway to tweak this to block images?
thank you
Jim
ok... i posted the code in a notepad, saved it as a .txt file, uploaded it to my site, changed it to be only .htacess
i cleared the caches from my browswers and everything
yet... my picture is still hotlinked on the following forum page (can i post the link?)... they do give the site a link also, which i appreciate, but not all of the unwanted traffic
<Sorry, no example URLs>
[edited by: tedster at 10:23 am (utc) on Nov. 14, 2005]