Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

HTTP (and HTTPS as well) has a referral header. This header allows the log analyzers to trace where the request is coming from. So, if you need to stop external referrals, this is the way to do it.

Here it is my .htaccess file I use:

RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?*$ [NC]
RewriteRule .(gif|jpg|swf|flv|png)$ [R=302,L]

This will deliver the file 1px.gif to all queries who are coming outside of domain.

Please take in mind that this can backfire, and it depends on your environment to use it or not. It can save you lot of bandwidth (which it protects your availability), but it can harm your SEO.


blog comments powered by Disqus


Read about IT, Migration, Business, Money, Marketing and other subjects.

Some subjects: FusionPBX, FreeSWITCH, Linux, Security, Canada, Cryptocurrency, Trading.