• Hello,
    I need to develop a multi language website with wordpress 3.01 and after reading the related page in the Codex (http://codex.wordpress.org/Multilingual_WordPress) I choose to work with separated wordpress sites.

    I have already enabled the multisite option in wordpress 3.01 (http://codex.wordpress.org/Create_A_Network) and build the three site with the path:

    • / (root)
    • /en/
    • /it/

    So now what I need is to attach to the root site ( / ) a rule that when the browser language is italian it’s automatically redirect to /it/ otherwise it’s redirect to /en/.

    I have already try with some plugin like redirection but without any result.

    Any suggestion? 🙂

Viewing 1 replies (of 1 total)
  • Thread Starter lucamascaro

    (@lucamascaro)

    I just try to add in the header.php file this code

    if(!isset($_SESSION['lang'])){
      if(preg_match('/it-IT/', $_SERVER['HTTP_USER_AGENT'])){
        header("location:it/");
      }else{
        header("location:en/");
      }
    }

    It’s work but isn’t a solution that manage in a good version the 301 redirection right?

    any suggestions? 🙁

Viewing 1 replies (of 1 total)

The topic ‘language-base redirection on two different sub-site’ is closed to new replies.