blocking a domain with htaccess (hitbotter)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Darrell
    Confirmed User
    • Feb 2003
    • 803

    #1

    blocking a domain with htaccess (hitbotter)

    I'm trying to block a domain using htaccess that is hitbotting my site. I've tried using several code variations like

    RewriteEngine On
    RewriteCond %{HTTP_REFERER} ^http://.*site1.com/* [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://.*site2.com/* [NC,OR]
    RewriteCond %{HTTP_REFERER} ^http://.*site3.com/* [NC]
    RewriteRule .* http://www.wherever.com [R,L]

    and whatever I do my site always comes up as either a '500 internal server error' or a 403 forbidden page. What am I doing wrong? I really appreciate any help with this.

    Thanks.
  • Sexzity
    Confirmed User
    • Jun 2002
    • 1329

    #2
    http://www.htaccesstools.com/

    Comment

    • 421Fill
      So Fucking Banned
      • Nov 2001
      • 20659

      #3
      http://www.htaccesstools.com could help

      Comment

      • Darrell
        Confirmed User
        • Feb 2003
        • 803

        #4
        Thanks for the replies. I tried the code at http://www.htaccesstools.com/ but I'm still getting the same errors which makes me think I need to change something on the server to use htaccess.

        Comment

        • Fabuleux
          Confirmed User
          • May 2003
          • 2543

          #5
          Check your apache errorlog to see what's wrong

          Comment

          • Lycanthrope
            Confirmed User
            • Jan 2004
            • 4517

            #6
            Try this:

            ^http://(www\.)?offendingdomains.com.*$ [NC,OR]
            ...

            and change .* to ^(.*)$ on your redirect line

            Comment

            • Darrell
              Confirmed User
              • Feb 2003
              • 803

              #7
              Thanks Lycanthrope, but I still get an error page.

              Comment

              • Lycanthrope
                Confirmed User
                • Jan 2004
                • 4517

                #8
                Did you upload in ASCII mode?

                I suppose it is possible Mod Rewrite isn't enabled... check w/ the host

                Comment

                • Darrell
                  Confirmed User
                  • Feb 2003
                  • 803

                  #9
                  Mod Rewrite is enabled and i did upload in Ascii mode :-)

                  I got the code below to work and it blocks the domain ok, but also stops UCJ tracking any incoming traffic! Does anybody have any idea why it's stopping UCJ from tracking incoming traffic?

                  Thanks for any replies.


                  Options SymLinksIfOwnerMatch
                  RewriteEngine On
                  RewriteCond %{HTTP_REFERER} ^http://.*site1.com/* [NC,OR]
                  RewriteCond %{HTTP_REFERER} ^http://.*site2.com/* [NC,OR]
                  RewriteCond %{HTTP_REFERER} ^http://.*site3.com/* [NC]
                  RewriteRule .* http://www.somewhere.com [R,L]

                  Comment

                  Working...