I have been trying to figure out how to set up multilingual site with MODx and Babel. I'm pretty sure the contexts and the plugin are both set correctly but the .htaccess is probably causing me troubles. Here's what is looks like, I have the root set in a subfolder /test/voltage/admin2test and only one extra language (besides English) in /test/voltage/admin2test/cz/
The /cz/ version, however, doesn't show and the page get's always redirected back to /test/voltage/admin2test/
RewriteEngine On
RewriteBase /test/voltage/admin2test/
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^my-domain\.cz [NC]
#RewriteRule (.*)
http://my-domain.cz/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.my-domain\.cz [NC]
#RewriteRule (.*)
http://www.my-domain.cz/$1 [R=301,L]
# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
#
https://www.domain.com when your cert only allows
https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*)
https://example-domain-please-change.com/$1 [R=301,L]
# The Friendly URLs part
# detect language when requesting the root (/)
#RewriteCond %{HTTP:Accept-Language} !^en [NC]
#RewriteRule ^$ en/ [R=301,L]
#RewriteRule ^$ cz/ [R=301,L]
# redirect all requests to /cz/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(cz)/favicon.ico$ favicon.ico [L,QSA]
# redirect all requests to /cz/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(cz)/assets(.*)$ assets$2 [L,QSA]
# redirect all other requests to /cz/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
[ed. note: filipc77 last edited this post 11 years, 5 months ago.]