Closed Thread
Results 1 to 3 of 3
Like Tree2Likes
  • 1 Post By Skizzerz
  • 1 Post By descalzo

Thread: banning a country from my site

  1. #1
    mbrowne12589 is offline x10Hosting Member mbrowne12589 is an unknown quantity at this point
    Join Date
    Jul 2011
    Posts
    10

    banning a country from my site

    I want to ban a country from my site. Do i do this or do you have to? also, can i switch this feature on and off myself once it is setup? thank you

  2. #2
    Skizzerz's Avatar
    Skizzerz is offline Contributors Skizzerz will become famous soon enough
    Join Date
    Nov 2007
    Location
    Texas
    Posts
    2,153

    Re: banning a country from my site

    To ban a country from your site, go to http://www.countryipblocks.net/ and in the right column choose ".htaccess deny" and the country you wish to block.
    Then copy/paste the result into your .htaccess file in public_html. To unblock it remove those entries from .htaccess

    (Disclaimer: the linked website is in no way endorsed by or affiliated with x10Hosting)
    mbrowne12589 likes this.
    Ryan Schmidt | Level 2 Support
    █ 888-X10-9668 - ryan[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: banning a country from my site

    Don't think that will work with the load balancing set up. allow/deny only sees the IP of the balancer.

    EDIT/ADD:

    Code to block one IP, tested and works on Chopin.

    Code:
    RewriteCond %{HTTP:X-Forwarded-For}     ^130\.65\.11\.68$  
    RewriteRule ^(.*)$  you-are-not-welcomed-here.html [L]
    Last edited by descalzo; 07-19-2011 at 08:29 PM.
    mbrowne12589 likes this.
    Nothing is always absolutely so.

Closed Thread

Similar Threads

  1. Replies: 1
    Last Post: 06-12-2011, 08:41 PM
  2. Wat is cause of banning
    By sanketrocks4u67 in forum Free Hosting
    Replies: 7
    Last Post: 09-27-2010, 08:00 AM
  3. no more ip banning please
    By teft90 in forum Free Hosting
    Replies: 0
    Last Post: 12-05-2007, 01:22 PM
  4. IP Banning System
    By Chris S in forum Scripts & 3rd Party Apps
    Replies: 11
    Last Post: 01-04-2006, 01:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers