Page 1 of 1

MLE 1.6.3 & mod_rewrite

Posted: Sat Aug 29, 2009 7:00 am
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.

Re: MLE 1.6.3 & mod_rewrite

Posted: Sat Aug 29, 2009 7:45 am
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

[SOLVED] MLE 1.6.3 & mod_rewrite

Posted: Sun Aug 30, 2009 1:05 am
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.

Re: MLE 1.6.3 & mod_rewrite

Posted: Wed Sep 02, 2009 3:52 pm
by nicmare
yep. had same problem. solved with it! thank you very much

Re: MLE 1.6.3 & mod_rewrite

Posted: Thu Sep 24, 2009 7:59 pm
by alby
Please put SOLVED in first topic

Alby