Forum Moderators: phranque
RewriteEngine on
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER}!^http://(www\.)?mydomainname\.com [NC]
RewriteRule \.jpe?g$ /images/nohotlink.gif [L]
This works as expected on my mac with Firefox, Safari and IE. However on my PC I never seem to get a referrer passed with either IE or Firefox. Looking at the HTTP headers sent from Firefox on the PC the referrer is set as expected. I have cleared caches, rebooted the PC everything but still no referrer by the time it get to apache. The apache re-write log just shows no referrer.
To make this stranger I have had somebody else try this on a PC and it all works for them.
Any ideas? Thanks.
No referer will sent for URLs typed-in directly, because there is no referring page, just a URL typed-in.
Internet security and firewall software can be set to block referrers.
Some browsers can be set to block referrers -- or have plugin/extension support that block referrers.
The above software may have per-user settings, in which case, you may have your referrer info blocked, while someone else logged in under a different account may be sending a referrer.
Jim