Pretty URLS problem
Posted: Tue Feb 09, 2010 10:22 pm
Hi guys,
First time I've used CMSMS and it seems great so far, so less bloated than WP or Joomla!
Anyway, the installation all went just fine and I've managed to get my templates and content sorted no problem atall.
I'm now trying to get pretty urls setup and have been checking other topics in the forum here before I posted this, tried to get these solutions to work and it doesn't and to be honest I just don't quite get it. I'm a noob with mod rewrites and stuff like this so please excuse me if i've missed something really obvious!
At the moment whenever I try the URL using pretty mysite.com/page2.html it turns up a 404.
My config.php looks like this...
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
And my .htaccess looks like this...(carbon copy of the sample one)
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#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
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Also I checked for mod_rewrite being turned on using the php info command I saw in another topic and it is listed under modules installed.
Any help is much appreciated...
First time I've used CMSMS and it seems great so far, so less bloated than WP or Joomla!
Anyway, the installation all went just fine and I've managed to get my templates and content sorted no problem atall.
I'm now trying to get pretty urls setup and have been checking other topics in the forum here before I posted this, tried to get these solutions to work and it doesn't and to be honest I just don't quite get it. I'm a noob with mod rewrites and stuff like this so please excuse me if i've missed something really obvious!
At the moment whenever I try the URL using pretty mysite.com/page2.html it turns up a 404.
My config.php looks like this...
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
And my .htaccess looks like this...(carbon copy of the sample one)
# Attempt to override some php settings, these settings may be helpful on some hosts if your
# default configuration does not meet CMS's minimum requirements, and your host
# has given your account appropriate permissions
#php_value upload_max_filesize "10M"
#php_value session_save_path "tmp/cache"
#php_flag magic_quotes_gpc Off
#php_flag register_globals Off
#php_flag session.use_trans_sid Off
# (this is important, so uncomment if your host permit)
#Options -Indexes
#ServerSignature Off
#
Options +FollowSymLinks
#
RewriteEngine on
#
#Sub-dir e.g: /cmsms
RewriteBase /
#
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# but ignore POST requests.
#RewriteCond %{REQUEST_URI} !/$
#RewriteCond %{REQUEST_URI} !\.
#RewriteCond %{REQUEST_METHOD} !POST$
#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
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Also I checked for mod_rewrite being turned on using the php info command I saw in another topic and it is listed under modules installed.
Any help is much appreciated...