[Solved] Pretty URLs with mod_rewrite, XP local install?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Piscator
New Member
New Member
Posts: 2
Joined: Sat Nov 29, 2008 1:13 am

[Solved] Pretty URLs with mod_rewrite, XP local install?

Post by Piscator »

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
Last edited by Piscator on Wed Dec 10, 2008 7:13 am, edited 1 time in total.
User avatar
korpirkor
Forum Members
Forum Members
Posts: 100
Joined: Sun Oct 28, 2007 1:15 pm

Re: Pretty URLs with mod_rewrite, XP local install?

Post by korpirkor »

In httpd.conf you have to set:

Code: Select all

LoadModule rewrite_module modules/mod_rewrite.so
and another thing (.htaccess):

Code: Select all

RewriteBase /cmsms/
Replace /cmsms/ by your cms made simple installation directory.

Code: Select all

RewriteRule ^(.+)$ index.php?page=$1 [QSA]
page have to be set properly too.


ps. I use WampServer on windows and everything is OK :P
Last edited by korpirkor on Mon Dec 01, 2008 10:06 pm, edited 1 time in total.
[url=http://www.polishwebdesign.pl/]Polish WebDesign Cezary Nowak
Projektowanie stron WWW[/ur]
Piscator
New Member
New Member
Posts: 2
Joined: Sat Nov 29, 2008 1:13 am

Re: Pretty URLs with mod_rewrite, XP local install?

Post by Piscator »

Thanks korpirkor, all is working fine now.  :)
Locked

Return to “[locked] Installation, Setup and Upgrade”