www.webdeveloper.com
Results 1 to 4 of 4

Thread: Block access by countries

  1. #1
    Join Date
    Dec 2008
    Posts
    133

    Block access by countries

    Hi, I used my hosting utility to block countries from accessing my website but it doesn't seems to work and my tech support is not much help. When I use the utility it creates a .htaccess file with the below content. can someone please help? thx.

    Code:
    GeoIPEnable on
    RewriteEngine on
       RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AD$   [OR]
       RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AF$   [OR]
       RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^AG$   [OR]
       RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^BB$   [OR]
       RewriteRule ^.*$ - [F]

  2. #2
    Join Date
    Mar 2009
    Posts
    452
    make sure GeoIP appache module is installed/configured/running properly also check http://dev.maxmind.com/geoip/legacy/mod_geoip2

  3. #3
    Join Date
    Dec 2008
    Posts
    133
    I checked with my hosting co. and they said it geoip 1.4.4. is installed and running. The issue is with the last OR in the list it even blocks country that is not in the list but if I delete the last OR it will not block any country.

  4. #4
    Join Date
    Mar 2009
    Posts
    452
    dono much about this module, read here http://dev.maxmind.com/geoip/legacy/..._on_country-17

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles