URL Rewriting

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
vim55k
New Member
New Member
Posts: 6
Joined: Thu May 20, 2010 10:08 am

URL Rewriting

Post 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
owr_bgld

Re: URL Rewriting

Post 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
vim55k
New Member
New Member
Posts: 6
Joined: Thu May 20, 2010 10:08 am

Re: URL Rewriting

Post by vim55k »

Thanks, tried and still the same:

173.203.86.222/c/
vim55k
New Member
New Member
Posts: 6
Joined: Thu May 20, 2010 10:08 am

Re: URL Rewriting

Post by vim55k »

Thanks, changed to only c, without / and the same ...
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: URL Rewriting

Post 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  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
vim55k
New Member
New Member
Posts: 6
Joined: Thu May 20, 2010 10:08 am

Re: URL Rewriting

Post 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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: URL Rewriting

Post by calguy1000 »

replytomk3 you're wrong again.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: URL Rewriting

Post 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?
vim55k
New Member
New Member
Posts: 6
Joined: Thu May 20, 2010 10:08 am

Re: URL Rewriting

Post 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
Peciura

Re: URL Rewriting

Post 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').
vim55k
New Member
New Member
Posts: 6
Joined: Thu May 20, 2010 10:08 am

Re: URL Rewriting

Post by vim55k »

Thank you very much ! It is working !
All was because I posted not in the MLE section
Locked

Return to “[locked] CMSMS MLE fork”