Forum Moderators: phranque

Message Too Old, No Replies

Referrers and hotlinking

         

potato95

12:59 pm on Jun 14, 2006 (gmt 0)

10+ Year Member



Hi
I have setup the following rule in httpd.conf

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.

jdMorgan

7:55 pm on Jun 14, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you clicking on a link, or typing in the URLs directly?
Do you have any "Internet Security" or firewall software running?
What is the difference between you accessing the site from your PC and someone else doing the same? Is this person using the same login account on the PC?

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

potato95

1:05 pm on Jun 15, 2006 (gmt 0)

10+ Year Member



Jim
Thanks for this. It turns out that I had some personal firewall stuff turned on that is on the computer by default, I'm not normally a PC user so never paid much attention to this. Once I turned this off all worked as expected.

Giles