[Solved] Pretty URLs with mod_rewrite, XP local install?
Posted: Sat Nov 29, 2008 1:45 am
I've followed the instructions in the CMSMS documentation and looked through relevant forum topics. I want to have pretty URLs of the form "/about.html" or "cars/ford.html" so that it presents like a static html site. But my attempts so far get a 404 error.
I've tried rebooting the server and clearing the CMSMS cache. I may be missing something obvious, especially in relation to how Apache works, which I don't fully understand, but hope you will bear with me.
CMSMS is a fresh install on an XP PC running "Uniform Server", and it runs fine. Details of the installation are: CMSMS 1.4.1, PHP 5.2.3, Server: Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3, Database: MySQL (which seems to be working fine). It is installed in the folder www/cmcms.
I notice that the CMSMS System Information / Server Information includes "config_file: 0666 Failure", but don't know if it is relevant or important.
The settings I've tried are:
\cmsms\config.php
-------------------------
$config['internal_pretty_urls'] = false;
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
-------------------------
Apache Server Config
-------------------------
AllowOverride All - set in usr\local\apache2\conf\httpd.conf
-------------------------
.htaccess
-------------------------
## REWRITE DEFAULTS ###
RewriteEngine On
RewriteBase /cmsms/
# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# END CMSMS
-------------------------
Thank you again for considering my request, any help you may be able to give will be much appreciated.
Regards to all,
Piscator
I've tried rebooting the server and clearing the CMSMS cache. I may be missing something obvious, especially in relation to how Apache works, which I don't fully understand, but hope you will bear with me.
CMSMS is a fresh install on an XP PC running "Uniform Server", and it runs fine. Details of the installation are: CMSMS 1.4.1, PHP 5.2.3, Server: Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3, Database: MySQL (which seems to be working fine). It is installed in the folder www/cmcms.
I notice that the CMSMS System Information / Server Information includes "config_file: 0666 Failure", but don't know if it is relevant or important.
The settings I've tried are:
\cmsms\config.php
-------------------------
$config['internal_pretty_urls'] = false;
$config['assume_mod_rewrite'] = true;
$config['page_extension'] = '.html';
$config['use_hierarchy'] = true;
-------------------------
Apache Server Config
-------------------------
AllowOverride All - set in usr\local\apache2\conf\httpd.conf
-------------------------
.htaccess
-------------------------
## REWRITE DEFAULTS ###
RewriteEngine On
RewriteBase /cmsms/
# CMSMS Rewriting
# Set assume mod_rewrite to true in config.php and clear CMSMS cache
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
# END CMSMS
-------------------------
Thank you again for considering my request, any help you may be able to give will be much appreciated.
Regards to all,
Piscator