Trafic redirect to specific language

Discussion in 'Site & Server Administration' started by AndyLaw, Dec 2, 2012.

  1. #1
    Hi,

    My site has 3 different languages and will have even more in the future. What I am trying to do it redirect all users depending on the country they are to the specific language.

    How could I do this with .htaccess to redirect all people to main page, Spanish people to domain.com/es, and so on?
     
    AndyLaw, Dec 2, 2012 IP
  2. slackersecurity

    slackersecurity Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Example:
    
    RewriteEngine on
    RewriteCond %{HTTP:Accept-Language} (es) [NC]
    RewriteRule .* www.site.com/es [L]
    Code (markup):
     
    slackersecurity, Dec 2, 2012 IP