Pretty URLs mod_rewrite = 404 not found
Posted: Mon Aug 23, 2010 8:58 pm
I recently installed CMSMS 1.8.2 and went about setting up pretty urls the same way i've had success with in the past. 1. Setup config.php with these settings:
2. setup an .htaccess file with the following:
my site is currently in a domain i set up in plesk and am accessing via the server's ip vs. the actual domain as this is a rebuild of an existing site (not sure if that makes a difference..?)
when type in the domain, i get the home/index page, but clicking any of the cmsms links in the menu results in 404 not found errors. The page addresses are being converted to pretty urls, ie: "http://xx.xx.xxx.xx/faq.html, but obviously these links mean nothing to the server/web browser.
what should i look into next? what could be causing this? thanks for any input!
Code: Select all
$config['url_rewriting'] = 'mod_rewrite';
#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';
#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy? (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;
#If using none of the above options, what should we be using for the query string
#variable? (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
Code: Select all
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
# 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 ^(.+)$ index.php?page=$1 [QSA]
when type in the domain, i get the home/index page, but clicking any of the cmsms links in the menu results in 404 not found errors. The page addresses are being converted to pretty urls, ie: "http://xx.xx.xxx.xx/faq.html, but obviously these links mean nothing to the server/web browser.
what should i look into next? what could be causing this? thanks for any input!