Hi,
I configured everything for the SEO Approch using this tutorial :
http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html. But not all the url are working...
My site is now in a local apache server inside a directory : www/mysite/ (I renamed the real name of the site for the forum)
Two languages : fr (context web), de (context de)
http://localhost/mysite/ -> redirecting to http://localhost/mysite/fr/ but after message : "The page is not redirecting properly". It seem to be a loop ?
http://localhost/mysite/fr/ -> not working with message "The page is not redirecting properly"
http://localhost/mysite/fr/index.php -> working well
http://localhost/mysite/index.php -> working well
http://localhost/mysite/de/index.php -> 503 Error Page not found
Using one of above link working for th index.php file, I try to access other page clicking on the displayed menu. This is the link :
http://localhost/mysite/fr/aviation.html => not working again "The page is not redirecting properly" !
The rewrite rule for the css is working well.
My Babel Plugin :
<?php
if($modx->context->get('key') != "mgr"){
/* grab the current language from the cultureKey request var /
switch ($_REQUEST['cultureKey']) {
case 'de':
/ switch the context /
$modx->switchContext('de');
break;
default:
/ Set the default context here /
$modx->switchContext('web');
break;
}
/ unset GET var to avoid
* appending cultureKey=xy to URLs by other components */
unset($_GET['cultureKey']);
}
My .htaccess :
RewriteCond %{HTTP:Accept-Language} !^de [NC]
RewriteRule ^$ fr/ [R=301,L]
RewriteRule ^$ de/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(fr|de)/favicon.ico$ favicon.ico [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(fr|de)/assets(.*)$ assets$2 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(fr|de)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
Attached, printscreen of system configuration and log of the htaccess (with RewriteLogLevel 9)
Do I need to configure the http host in htaccess ?
Thanks for your help ! I spend few hour and can't find any solution !
[ed. note: laurentw last edited this post 12 years ago.]