MLE 1.6.3 & mod_rewrite

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
mr.bacan

MLE 1.6.3 & mod_rewrite

Post by mr.bacan »

I'm working on a 2 language site (English & Spanish). I activated the mod_rewrite function in the config.php and it was working as supposed until I tried to change between languages. It just won't do the change, it keeps showing the same page, even though the url changes.

Initially it was http://thehilltop-panama.com/[b]esp[/b]/home-2.html (for spanish) and when I change to English the url changes to http://thehilltop-panama.com/[b]eng[/b]/home-2.html but it keeps showing the Spanish page.

I'm guessing there's something wrong with my .htaccess which is:

Code: Select all

# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
<IfModule mod_rewrite.c>
RewriteEngine on
#
#Sub-dir e.g: /cmsms
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 ^(.+)$ index.php?page=$1 [QSA]
</IfModule>
Thanks in advance.
User avatar
seensite
Forum Members
Forum Members
Posts: 173
Joined: Sun Feb 10, 2008 7:36 pm

Re: MLE 1.6.3 & mod_rewrite

Post by seensite »

mr.bacan wrote: I'm guessing there's something wrong with my .htaccess which is:
...
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
...
Thanks in advance.
I bet your guess is right, try to change the quoted line of your .htaccess for this one:
RewriteRule ^([^/]+)/(.*)$ index.php?page=$2&hl=$1 [QSA]
...and it should be ok.


There is a htaccess.mle file in /doc of the MLE package which indicates :

>

Best regards
The universe of information technology is constantly growing and contains only emerging products built on successive patches
mr.bacan

[SOLVED] MLE 1.6.3 & mod_rewrite

Post by mr.bacan »

...try to change the quoted line of your .htaccess for this one:
RewriteRule ^([^/]+)/(.*)$ index.php?page=$2&hl=$1 [QSA]
...and it should be ok.
Problem solved. This worked perfectly.
Thanks a lot for your help.
nicmare
Power Poster
Power Poster
Posts: 1150
Joined: Sat Aug 25, 2007 9:55 am

Re: MLE 1.6.3 & mod_rewrite

Post by nicmare »

yep. had same problem. solved with it! thank you very much
alby

Re: MLE 1.6.3 & mod_rewrite

Post by alby »

Please put SOLVED in first topic

Alby
Locked

Return to “[locked] CMSMS MLE fork”