Page 1 of 1

URL Rewriting

Posted: Thu May 20, 2010 10:22 am
by vim55k
Hi All, please help.

Trying to set pretty URL and not succeeding.

Set the config.php, the .htaccess, cleaned cache from admin, restarted apache, restarted php.
There is  {metadata} in of template.
Also similar htaccess and installation in directory on the same site of ELXIS and MODX and SMF working with url rewriting.

Setup:
Fresh CMSMS MLE 1.7.1 install in default site : directory : c ( /var/www/c/ ). Ubuntu, apache2.

from config.php :
$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '/';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'pg';

.htaccess :
RewriteEngine on

RewriteBase /c/

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

Thank you very much

Re: URL Rewriting

Posted: Thu May 20, 2010 10:28 am
by owr_bgld
vim55k wrote: RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
In my case it only worked with the two "[NC]" at the end of the lines

Re: URL Rewriting

Posted: Thu May 20, 2010 10:44 am
by vim55k
Thanks, tried and still the same:

173.203.86.222/c/

Re: URL Rewriting

Posted: Fri May 21, 2010 10:59 pm
by vim55k
Thanks, changed to only c, without / and the same ...

Re: URL Rewriting

Posted: Sat May 22, 2010 8:07 am
by Rolf
vim55k wrote: from config.php :
$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '/';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'pg';

.htaccess :
RewriteEngine on

RewriteBase /c/

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

You changed the 'page' to 'pg' in the config.php.
You need to change that also in the .htaccess!

Code: Select all

RewriteRule ^(.+)$ index.php?pg=$1 [QSA]
Reg. Rolf  :)

Re: URL Rewriting

Posted: Sun May 23, 2010 9:13 pm
by vim55k
Changed the config to :
$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '/';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'page';

Doesn't help.

Re: URL Rewriting

Posted: Sun May 23, 2010 11:22 pm
by calguy1000
replytomk3 you're wrong again.

Re: URL Rewriting

Posted: Mon May 24, 2010 12:38 am
by Jeff
Rewrite is working. This link works: http://173.203.86.222/c/cmsms_tags

But what is your setup? are you running MLE? what is hl=ru_RU in the URLs created by CMSms?

Re: URL Rewriting

Posted: Mon May 24, 2010 10:42 pm
by vim55k
vim55k wrote: Changed the config to :
$config['url_rewriting'] = 'mod_rewrite'; // this is new from 1.6
$config['page_extension'] = '/';
$config['use_hierarchy'] = true; // this will be the standard from 1.7
$config['query_var'] = 'page';

Doesn't help.
calguy1000 wrote: replytomk3 you're wrong again.
I changed the config to be similar to .htaccess -> page

ajprog wrote: Rewrite is working. This link works: http://173.203.86.222/c/cmsms_tags

But what is your setup? are you running MLE? what is hl=ru_RU in the URLs created by CMSms?
I internal is working,but the external doesn't :
http://173.203.86.222/c/index.php/ru_RU/default_templates/cmsms_tags/
Yes I'm running MLE

Re: URL Rewriting

Posted: Tue May 25, 2010 12:22 am
by Peciura
vim55k: check '/doc/htaccess.mle' as well as '/doc/htaccess.txt'
And your links should look like 'http://173.203.86.222/c/ru_RU/default_t ... msms_tags/' (without 'index.php').

Re: URL Rewriting

Posted: Sat May 29, 2010 12:03 am
by vim55k
Thank you very much ! It is working !
All was because I posted not in the MLE section