[ solved ] pretty urls - language doesn't switch

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Locked
mablung
New Member
New Member
Posts: 4
Joined: Fri May 07, 2010 4:07 pm

[ solved ] pretty urls - language doesn't switch

Post by mablung »

hey folks,

i'm confused about enabling pretty urls in MLE 1.6.6

i followed these instructions:
http://wiki.cmsmadesimple.org/index.php/FAQ/Installation/Pretty_URLs/de

so this is my .htaccess in the root directory (CMSMS isn't installed in a subdir):

Code: Select all

Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

# Rewrites urls in the form of /parent/child/
# but only rewrites if the requested URL is not a file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]

and this is my config.php:

Code: Select all

$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.htm';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';

everything works fine, but just in the default language! as soon as i want to switch languages, the url changes from e.g.
www.mysite.de/de/home/info.htm to
www.mysite.de/en/home/info.htm ,

but the content doesn't change.


i as well tried the .htacess in the MLE/doc installation folder, but this file just contains
# To deny PHPs

 order deny,allow
 deny from all
code which made my site stop working entirely.  ???


I tried do find some solution in this forum, but so far i haven't found a solution.

Any suggestions would be welcome!

Thanks,
Sebastian
Last edited by mablung on Fri May 14, 2010 9:33 am, edited 1 time in total.
uniqu3

Re: pretty urls - language doesn't switch

Post by uniqu3 »

Try

Code: Select all

RewriteRule ^([^/]+)/(.*)$ index.php?page=$2&hl=$1 [QSA]
instead of:

Code: Select all

RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]
Peciura

Re: pretty urls - language doesn't switch

Post by Peciura »

mablung: example is here"/doc/htaccess.mle"
mablung
New Member
New Member
Posts: 4
Joined: Fri May 07, 2010 4:07 pm

Re: pretty urls - language doesn't switch

Post by mablung »

;D sorry.

don't know why i missed the htaccess.mle

now everything works like a charm, thanks a lot!
Locked

Return to “[locked] CMSMS MLE fork”