.htaccess – Allow Only Listed Referrer to Access a Webpages

After days ago  i was play around with javascript to Allow page access only from pre-listed referrer

now i’m playing around with .htaccess
Thepurpose is same, to protect our rapidleech or our webpages from unauthorized access, in this case we’re only allow a visitor that come from listed http refferer

how to do it? this’s much more simple than javascript, just copy these lines to your .hataccess or create a new one

RewriteEngine on
RewriteCond %{HTTP_REFERER}!(.*)ocean-leecher.net(.*)
RewriteCond %{HTTP_REFERER}!(.*)blindtext.info(.*)
RewriteCond %{HTTP_REFERER}!(.*)yourdomain.com(.*)
RewriteRule ^(.*)$ - [F]

just add this code in your htaccess file, a create a new one if none existed on your webpage

3 Comments »

  1. avatar comment-top

    complex post. simply one unimportant where I contest with it. I am emailing you in detail.  

    comment-bottom
  2. avatar comment-top

    Hello!
    You may probably be very curious to know how one can manage to receive high yields on investments.
    There is no need to invest much at first.
    You may commense to get income with a money that usually is spent
    on daily food, that’s 20-100 dollars.
    I have been participating in one company’s work for several years,
    and I’m ready to share my secrets at my blog.

    Please visit my pages and send me private message to get the info.

    P.S. I earn 1000-2000 per day now.

    http://www.theblogmoney.com  

    comment-bottom
  3. avatar comment-top

    Hi,

    I didn’t realized before that llowing only listed referrer to wccess a Webpages is just that simple.  

    comment-bottom

RSS feed for comments on this post. TrackBack URL

Leave a comment