MLE: How to remove index.php in pretty URL in MLE version?

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
Jim_Bob
Forum Members
Forum Members
Posts: 33
Joined: Mon Jun 02, 2008 8:14 am

MLE: How to remove index.php in pretty URL in MLE version?

Post by Jim_Bob »

Hi,

I posted this question already in the german forum but somebody gave me the tip, that the
MLE (Multilanguage version of CMS) -Guru named ALBY is checking this forum - anyway.

I'm using the wonderful 1.4.1 MLE version of the cms with the "pretty url" adjustment and
everything is working fine, but the URL is looking like this:

"http://www.domain.de/index.php/de_DE/templates.html "

I tried to remove the index.php with this settings in the config.php and htaccess:
___________________________
htaccess:
RewriteEngine on
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !\.
RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

config.php
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;

Effect:
With this settings the index.php was removed from the URL , but
i'm not able to switch between the languages anymore, this means
I can't switch from f.e. English to German.

Does somebody got an idea to solve my problem?

Grettings from Germany
Jimbob
Jim_Bob
Forum Members
Forum Members
Posts: 33
Joined: Mon Jun 02, 2008 8:14 am

SOLVED: MLE: How to remove index.php in pretty URL in MLE version?

Post by Jim_Bob »

Solved the problem:

in the htaccess change
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
to
RewriteRule ^(.+)/(.+)$ index.php?hl=$1&page=$2 [QSA]

and make the following entres in the config.php

$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = false;
alby

Re: SOLVED: MLE: How to remove index.php in pretty URL in MLE version?

Post by alby »

Jim_Bob wrote: Solved the problem:

in the htaccess change
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
to
RewriteRule ^(.+)/(.+)$ index.php?hl=$1&page=$2 [QSA]

and make the following entres in the config.php

$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = false;
I have moved this in appropriate forum.
For info, in doc folder there is the basic htaccess for MLE version

Alby
Locked

Return to “[locked] CMSMS MLE fork”