2013-04-22, 01:29:49
(2013-04-10, 04:47:21)mvlcek Wrote:(2013-04-10, 02:10:43)TeeJay Wrote: 3) When using custom permalinks showing only the secondary language, in the admin panel I wrote
and changed .htaccess like this:Code:%nondefaultlanguage%/%parent%/%slug%/
Code:...
# To make custom permalinks with the secondary language only work :)
RewriteRule ^/?$ cs/ [R,L] # optional
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(cs|en)/(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$3&lang=$1 [QSA,L]
RewriteRule ^(cs|en)/?$ index.php?lang=$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*?/)?([A-Za-z0-9-]+)/?$ index.php?id=$2&lang=en [QSA,L]
Looks fine.
Found the problem. It was the last line which is ending with "en", but it has to be ending with the standard language code which is "cs" for me.
It would be nice to emphasize this fact, it can be easily overlooked.
However I need some special rewrite rules for the News Manager now, because the posts of the NM don't seem to work in the second language with /en/ in the address. When there is nothing it works.
I have already asked in my topic about this problem.
http://get-simple.info/forums/showthread.php?tid=4659
What could be interesting for you maybe is that adding the second version of NM rewrite rules for the secondary langauge (English)
Code:
RewriteRule ^clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
RewriteRule ^en/clanky/tag/([^/.]+)/?$ index.php?id=clanky&tag=$1 [L]
RewriteRule ^en/clanky/post/([^/.]+)/?$ index.php?id=clanky&post=$1 [L]
RewriteRule ^en/clanky/page/([^/.]+)/?$ index.php?id=clanky&page=$1 [L]
RewriteRule ^en/clanky/archive/([^/.]+)/?$ index.php?id=clanky&archive=$1 [L]
If you knew what to do, it would be nice. Thank you.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
» The little I did for GetSimple