We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39583
    • 103 Posts
    I'm trying to get Babel to work on a site I'm making. And I want FURLs to work as well.
    I can only get my start page to work for the original language.
    But the .htaccess seems to have problems with any sub page in any of the languages.

    In the attached image I have is the FURL settings i'm using.

    And this is the htaccess file:

    RewriteEngine On
    RewriteBase /progress/ferinject
    
    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(de|fr)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA,NC]
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(de|fr)/favicon.ico$ favicon.ico [L,QSA,NC]
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(de|fr)/assets(.*)$ assets$2 [L,QSA,NC]
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(de|fr)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA,NC]
    
    BrowserMatch "MSIE" brokenvary=1
    BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
    BrowserMatch "Opera" !brokenvary
    SetEnvIf brokenvary 1 force-no-vary


    When accessing any sub page I get a 310 error (too many redirects). Any suggestions of what I'm missing?

    EDIT:
    If htaccess looks like above, all the content under the "web" context works fine. But as soon as I go to the french version /fr/ I get the too many redirects error. If I then change this line:

    RewriteRule ^(de|fr)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA,NC]


    to (without &q=$2):

    RewriteRule ^(de|fr)?/?(.*)$ index.php?cultureKey=$1 [L,QSA,NC]


    then I can jump back and forward between the two languages, but obviously the sub pages doesn't work even though the address looks right.

    Is it possible that q=$2 is messing it up for the second context?

    EDIT2:

    If I try using non friendly url it doesn't work either.

    To the original context it works with the following:
    progress/ferinject/index.php?cultureKey=de&q=1

    but if I change to the french one with the correct id of the start page like:
    progress/ferinject/index.php?cultureKey=fr&q=2

    Than I get a "503 error page not found".

    This question has been answered by phacer. See the first response.

    [ed. note: phacer last edited this post 11 years, 5 months ago.]
      --
      André
    • discuss.answer
      • 39583
      • 103 Posts
      Problem resolved when switching to another server where modx isn't in a sub directory. But it doesn't really solve the main problem!
        --
        André
        • 12410
        • 353 Posts
        Hi,
        I have the same issue using modx revo in a subdirectory
        MODX Revolution 2.2.6-pl (traditional)
        babel-2.2.5-pl

        Has this issue a solution? q=$2 seems to be the issue.
        Thanks
          • 40045
          • 534 Posts
          hm, don't know exactly what is wrong with your setup but I have sites that are in a subdirectory and are the "host-modx" for more sites (up to 10...) that live within more subdirectories and I use babel with a lot of them, also MODx 2.2.6 and Babel 2.2.5...also had these problems but cannot tell you what exactly was the problem. What I do is to have a .htaccess in the root redirecting requests to sepcific Domains to the corresponding subdirectory and then in that subdirectory I have the .htaccess containing the above BUT I don't use the path of the subdirectory as RewriteBase, there I just juse "/", the rest is the same and it works...
            • 12410
            • 353 Posts
            Hi I found the issue today. I need to include the sub directory in the context base URL so instead of /fr/ it needed to be /subdir/fr/ in the French context base path. Wasn't the htaccess after all. Thanks