1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

block website in .htaccess

Discussion in 'Apache' started by choice, Mar 20, 2007.

  1. #1
    i have an autosurf that i have never joined as they are crap websites sending traffic to one of my websites

    i have tried contacting them but with no luck

    is there a way i can ban there domain from accessing my website via htaccess
     
    choice, Mar 20, 2007 IP
  2. Snout

    Snout Peon

    Messages:
    238
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To ban a certain domain add this line: Deny from banneddomain.com

    To ban a certain IP add this line: Deny from 127.128.129.130

    To ban a mask of whole class C (bans 255 IPs, from 127.128.129.0 to 127.128.129.255): Deny from 127.128.129

    To ban user agent pattern add this:

    RewriteCond %{HTTP_USER_AGENT} ^NameOfBannedUserAgentHere
    RewriteRule ^.* - [F,L]
     
    Snout, Mar 20, 2007 IP
    choice likes this.