How to Block Visitors Comming From Specific Site/search engine

Discussion in 'Apache' started by mojtata, Jun 16, 2008.

  1. #1
    I wanna block all visitors coming from:websearch.cs.com
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} websearch.cs.com [NC]
    RewriteRule .* - [F]

    and put it on site folder (where for example my index.html is and all site files)
    but it appears not to work ?

    any better solution.

    Thanks
     
    mojtata, Jun 16, 2008 IP
  2. mojtata

    mojtata Well-Known Member

    Messages:
    722
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Also does it works for blocking keywords
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} (viagra) [NC,OR]
    RewriteRule .* - [F]


    also does above (first post) removes visitors from all pages of that domain or only main ( i need to restrict all search results).

    thanks
     
    mojtata, Jun 16, 2008 IP
  3. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #3
    1.
    whats the URL / site where you have your .htaccess installed ?

    2.
    make sure the site to exclude EXISTS as posted by you

    if I enter your search engine URL as below, then I get a redirect to
    http://webcenters.netscape.compuserve.com/search/default.jsp
    Code (markup):
    hence a referrer would show a different referrar site than you published.
     
    hans, Jun 19, 2008 IP
  4. kennick

    kennick Peon

    Messages:
    334
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If you know their IP address you could try editing your .htaccess file to include:

    deny from (and add the IP address here)
     
    kennick, Jun 19, 2008 IP
  5. Hata Mari

    Hata Mari Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You have a syntax error in second line:

    instead:
    RewriteCond %{HTTP_REFERER} websearch.cs.com [NC]

    use:

    RewriteCond %{HTTP_REFERER} websearch\.cs.com [NC]


    should work ok now...
     
    Hata Mari, Jan 29, 2011 IP
  6. blackbrontok

    blackbrontok Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    websearch.cs.com/ is using ip : 205.188.98.199
    if u using CSF, enter this ip to deny on CSF and it will blocked from ur server
     
    blackbrontok, Feb 6, 2011 IP