<![CDATA[ Language switching problem - My Forums]]> https://forums.modx.com/thread/?thread=45616 <![CDATA[Re: Language switching problem]]> https://forums.modx.com/thread/45616/language-switching-problem#dis-post-263876
maybe you could try this in your htaccess (the way YAMS currently generate htaccess)

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]

RewriteRule ^en$ en/ [R=301,L]
RewriteRule ^ro$ fr/ [R=301,L]
RewriteRule ^fr$ fr/ [R=301,L]

# For Friendly URLs
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^en/(.*)$ index.php?q=$1 [L,QSA]
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^ro/(.*)$ index.php?q=$1 [L,QSA]
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^fr/(.*)$ index.php?q=$1 [L,QSA]
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


Hope it helps

Have swing]]>
virtualbear Apr 28, 2011, 12:09 AM https://forums.modx.com/thread/45616/language-switching-problem#dis-post-263876
<![CDATA[Language switching problem]]> https://forums.modx.com/thread/45616/language-switching-problem#dis-post-263875
I am using YAMS (latest version, 1.1.9) on a MODx site (1.0.2). Last year everything was fine, but in the mean-time, something went wrong and I cannot see what. The site displays the default language (English), all pages in this language are fine, but switching to the other two languages gives a 404 error. Plugin execution order is fine at the OnParseDocument (first YAMS, then PHx)

The url is www.theeventor.ro. The .htaccess is below.

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]

# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]

# For Friendly URLs
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^en/(.*)$ index.php?q=$1&yams_lang=en [L,QSA]
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^ro/(.*)$ index.php?q=$1&yams_lang=ro [L,QSA]
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^fr/(.*)$ index.php?q=$1&yams_lang=fr [L,QSA]
RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


Anyone can help me find the problem? Any other info available on request.]]>
smart.1 Apr 27, 2011, 10:12 AM https://forums.modx.com/thread/45616/language-switching-problem#dis-post-263875