HELP - No matter which page I select I always get the home page

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
tommysaidso

HELP - No matter which page I select I always get the home page

Post by tommysaidso »

I recently installed CMSMS and got it up and running. Everything seemed to be working fine. I then updated the config.php file to use Pretty URLs and mod_rewrite. Then I tried creating a new page, which worked fine, but now when viewing my site I get the home page regardless of which page I click in the menu. The url's reflect the page I'm requesting, but the content is the home page and the bread crumb says I'm still on the home page. I'm confused. Any ideas would be much appreciated! Thanks.

Tommy
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: HELP - No matter which page I select I always get the home page

Post by Nullig »

Probably your .htaccess file. Can you post it?

Nullig
tommysaidso

Re: HELP - No matter which page I select I always get the home page

Post by tommysaidso »

Thanks. I certainly can. Here it is:

#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off

# Make sure you have Options FollowSymLinks
# and Allow on
RewriteEngine On

#Rewrites page.shtml as index.php?page
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: HELP - No matter which page I select I always get the home page

Post by Nullig »

It should look like this:

Options +FollowSymLinks
RewriteEngine on
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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]

Nullig
tommysaidso

Re: HELP - No matter which page I select I always get the home page

Post by tommysaidso »

Excellent. It worked wonders. Thank you for your help!
Pierre M.

Re: HELP - No matter which page I select I always get the home page

Post by Pierre M. »

Hello,

I don't understand why it wasn't working. It seems Tommy was using the (known working) provided .htaccess sample.

Pierre M.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: HELP - No matter which page I select I always get the home page

Post by Nullig »

He was missing a few lines.

Nullig
Pierre M.

Re: HELP - No matter which page I select I always get the home page

Post by Pierre M. »

No, the known-to-work provided sample in the official package... works.
Is it a matter of URL postfix ? I mean : no ".html".

Pierre M.
Locked

Return to “CMSMS Core”