We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 50923
    • 137 Posts
    I have problem with my .htcaccess on server and babel

    I have two language and trying to setup babel, here is my .htcaccess
    RewriteEngine On
    RewriteBase /
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    
    # Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^mywebsite\.org [NC]
    RewriteRule (.*) http://mywesbite.org/$1 [R=301,L]
    
    # redirect all requests to /de/favicon.ico and /nl/favicon.ico
    # to /favicon.ico
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(en|sr)/favicon.ico$ favicon.ico [L,QSA]
    						  
    # redirect all requests to /de/assets* and /nl/assets* to /assets*
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(en|sr)/assets(.*)$ assets$2 [L,QSA]
    						 
    # redirect all other requests to /de/* and /nl/*
    # to index.php and set the cultureKey parameter
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(en|sr)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]



    When i type in url like this
    http://mywesbite.org/index.php?cultureKey=sr

    It shows Serbian content

    But when i try
    http://mywesbite.org/sr/

    It shows default English

    I have tried a lot of thing, can somebody help me with this?


      <a href="www.play2web.com" title="izrada web sajtova">Izrada web sajtova</a>
    • Quote from: miomir.dancevic at Dec 26, 2015, 03:01 PM

      When i type in url like this
      http://mywesbite.org/index.php?cultureKey=sr

      It shows Serbian content

      But when i try
      http://mywesbite.org/sr/

      It shows default English

      Hi,

      Do you enable fancy URL and setup each context setting properly (site_url, base_url, cultureKey)?

      sr context
      en context:

      See more at: http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html
        zaenal.lokamaya