SOLVED - Pretty URLs and mod_rewrite = 404
Posted: Fri Nov 06, 2009 11:16 pm
I have a base installation of 1.6.6. located in a sub folder www.domain.com/cms
I have set .httaccess as:
# Options +FollowSymLinks
RewriteEngine on
RewriteBase /cms/
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
# 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 ^(.+)(.html)?$ index.php?page=$1 [QSA]
I have set config.php:
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
I want to create URLs as: www.domain.com/cms/page_name.html
When I hover over a link I see the correct www.domain.com/cms/page_name.html
When I click a link I get an error 404
If I click the home icon, it works correctly and goes back to www.domain.com/cms
I have several earlier versions (1.5.4) of CMSMS running on the same host and Pretty URLs are working happily.
Any ideas?!?
Cheers,
Marc
I have set .httaccess as:
# Options +FollowSymLinks
RewriteEngine on
RewriteBase /cms/
# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# except for form POSTS
# 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 ^(.+)(.html)?$ index.php?page=$1 [QSA]
I have set config.php:
$config['url_rewriting'] = 'mod_rewrite';
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
$config['query_var'] = 'page';
I want to create URLs as: www.domain.com/cms/page_name.html
When I hover over a link I see the correct www.domain.com/cms/page_name.html
When I click a link I get an error 404
If I click the home icon, it works correctly and goes back to www.domain.com/cms
I have several earlier versions (1.5.4) of CMSMS running on the same host and Pretty URLs are working happily.
Any ideas?!?
Cheers,
Marc