Hi,
thanks also for posting.
It seems now I can access sites like domain/folder/modx/contact.html for example but domain/folder/en/ does not work, it only works if I target individual pages. What could be wrong?
Do you also have modx in a sub/sub folder like I have?
http://mydomain.com/sub/modx/ ?
Here is my .htaccess
RewriteEngine On
RewriteBase /munkak/modx/
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^dobodesign\.com [NC]
RewriteRule (.*)
http://dobodesign.com/$1 [R=301,L]
# The Friendly URLs part
# redirect all requests to /en/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|hu)/favicon.ico$ favicon.ico [L,QSA]
# redirect all requests to /hu/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|hu)/assets(.*)$ assets$2 [L,QSA]
# redirect all other requests to /en/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(en|hu)?/?(.*)$ index.php?cultureKey=$1 [L,QSA]
RewriteRule ^(en|hu)?/?(.+)$ index.php?cultureKey=$1&q=$2 [L,QSA]
RewriteRule ^(en|hu)?/?$ index.php?cultureKey=$1 [L,QSA]
#RewriteRule ^(en|hu)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
and my gateway plugin
<?php
if($modx->context->get('key') != "mgr"){
/* grab the current langauge from the cultureKey request var */
switch ($_REQUEST['cultureKey']) {
case 'hu':
/* switch the context */
$modx->switchContext('Magyar');
break;
case 'en':
/* switch the context */
$modx->switchContext('web');
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']);
}
?>
can you post screenshot of how it is set up in the manager under friendly url ?
[ed. note: openstep last edited this post 11 years, 3 months ago.]