with mod_rewrite enabled = same content on all pages

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
MetaMan
New Member
New Member
Posts: 3
Joined: Thu Feb 23, 2017 9:52 am

with mod_rewrite enabled = same content on all pages

Post by MetaMan »

Hello,

This is first installation of V2 and I run into a problem I haven’t seen before.

I'm running CMS Made Simple 2.1.6. I'm using PHP 5.6.30, and MySQL 5.5.53. This is all working with Apache ---running on linux 2.6.32-642.6.2.el6.x86_64 on x86_64

I have problems when I try to enable pretty urls.
When I add:
$config['url_rewriting'] = 'mod_rewrite';
to my config file ({metadata} is present in template) and clear cache, …. Pretty URLs work... but every page displays the homepage content.

Removing $config['url_rewriting'] = 'mod_rewrite'; , I'm back to ugly URLs and the correct content displays for all pages.

No additional modules are installed yet.

Any suggestions?
MetaMan
New Member
New Member
Posts: 3
Joined: Thu Feb 23, 2017 9:52 am

Re: with mod_rewrite enabled = same content on all pages

Post by MetaMan »

An additional bit of information.

With $config['url_rewriting'] = 'mod_rewrite'; set in config.

I see the correct page content here.
domain.com/index.php?ml=templates-and-stylesheets

But the incorrect content here (it gets the homepage content)
domain.com/how-cmsms-works/templates-and-stylesheets
MetaMan
New Member
New Member
Posts: 3
Joined: Thu Feb 23, 2017 9:52 am

Re: with mod_rewrite enabled = same content on all pages

Post by MetaMan »

Solved

Removing this setup setting fixed the issue
$config['query_var'] = 'ml';

I now have pretty urls and the correct page content loading/
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: with mod_rewrite enabled = same content on all pages

Post by Rolf »

That is correct, because the default .htaccess file assumes query var is "page". So if you want to use another one you need to change it in the .htaccess file too
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Locked

Return to “CMSMS Core”