htaccess difened referrer blocking? Please help!

Discussion in 'HTML & Website Design' started by abraxas, Apr 25, 2013.

  1. #1
    Hi all,

    Does somebody know if it is possible to the following via .htaccess:
    I want to block all referrers from a particular TLD, but add an exception for one?
    In my case I need to block all the .ru TLDs, while at the same time Yandex.ru is allowed.
    Is this possible and if so how (what's the code)?

    I can block the unwanted traffic from each domain but this will really take tooooooo long as they are too many!

    Thanks in advance :)
     
    abraxas, Apr 25, 2013 IP
  2. lkraj

    lkraj Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Try using apache module mod_authz_host
     
    lkraj, Apr 26, 2013 IP
  3. abraxas

    abraxas Well-Known Member

    Messages:
    1,422
    Likes Received:
    44
    Best Answers:
    1
    Trophy Points:
    125
    #3
    Please can you give me some more details or maybe some example code?
    I have no idea what this is :(
     
    abraxas, Apr 26, 2013 IP
  4. abraxas

    abraxas Well-Known Member

    Messages:
    1,422
    Likes Received:
    44
    Best Answers:
    1
    Trophy Points:
    125
    #4
    One more question if somebody is aware:
    Do you think creating a big, very big .htaccess file could be a problem for SEs? I mean smth like 100-200 lines in order to block a number of referrers as well as "bad bots" plus some internal site redirects?
    It wont get bigger than few KB, but seems quite long....
     
    abraxas, Apr 27, 2013 IP
  5. HuggyStudios

    HuggyStudios Well-Known Member

    Messages:
    724
    Likes Received:
    20
    Best Answers:
    26
    Trophy Points:
    165
    #5

    I don't think it's going to cause any issues, but I don't work for Google so can't tell you that for 100%.

    Have a look at this page: http://httpd.apache.org/docs/2.2/howto/access.html this has everything you need to know about accomplishing what you need.

    Glen
     
    HuggyStudios, Apr 27, 2013 IP