Answer the question
In order to leave comments, you need to log in
How to fix bad .htaccess babel plugin setting issue in modx?
Hello. The problem is that modx opens the Russian version and all its articles, but in English it only opens the main one
Answer the question
In order to leave comments, you need to log in
What error comes up when you open the English version of the article?
CNC enabled or not?
Plugin installed on OnHandleRequest
?
The plugin should be something like this:
<?php
if($modx->context->get('key') != "mgr")
{
/* grab the current langauge from the cultureKey request var */
$currCultureFromRequest = isset($_REQUEST['cultureKey']) ? $_REQUEST['cultureKey'] : NULL;
$modx->log(modX::LOG_LEVEL_DEBUG, 'pageRouting: Income context key ' . $currCultureFromRequest);
switch ($currCultureFromRequest)
{
case 'ru':
case 'en':
/* switch the context */
$modx->switchContext($currCultureFromRequest);
$modx->log(modX::LOG_LEVEL_DEBUG, 'pageRouting: Context switched to ' . $currCultureFromRequest);
break;
default:
/* Set the default context here */
$modx->switchContext('web');
$modx->log(modX::LOG_LEVEL_DEBUG, 'pageRouting: Context switched to web');
break;
}
unset($_REQUEST['cultureKey']);
}
.htaccess
for him this is (with reservations, the paths depend on you):RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(web|en|ru)/assets(.*)$ assets$2 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(web|en|ru)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
# остальные Ваши настройки/директивы для apache/php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question