Page 1 of 1

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

Posted: Sat Sep 15, 2007 9:30 pm
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

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

Posted: Sat Sep 15, 2007 9:33 pm
by Nullig
Probably your .htaccess file. Can you post it?

Nullig

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

Posted: Sat Sep 15, 2007 10:09 pm
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]

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

Posted: Sun Sep 16, 2007 2:30 am
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

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

Posted: Sun Sep 16, 2007 3:15 pm
by tommysaidso
Excellent. It worked wonders. Thank you for your help!

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

Posted: Sun Sep 16, 2007 5:54 pm
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.

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

Posted: Mon Sep 17, 2007 5:02 am
by Nullig
He was missing a few lines.

Nullig

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

Posted: Mon Sep 17, 2007 9:22 pm
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.