1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Something wrong with my .htaccess

Discussion in 'General Scripting Chat' started by thesyndicate, Feb 10, 2017.

Tags:
  1. thesyndicate

    thesyndicate Regular Member

    Joined:
    Oct 8, 2008
    Messages:
    341
    Likes Received:
    71
    I am trying to block all countries expect two. But now it blocks all of them

    Code:
    # Redirect
    Redirect 301 / www.hello.com
    
    # RewriteEngine on
    RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^(TH|SE)$
    RewriteRule ^(.*)$ http://www.google.com$1 [L]
     
  2. blackbeard01

    blackbeard01 Newbie

    Joined:
    Feb 22, 2017
    Messages:
    5
    Likes Received:
    1
    isn't the second line going to redirect everything before you even get to the Geo-specific lines. Comment this line out and see what happens;
    Redirect 301 /
     
    • Thanks Thanks x 1