Pretty URLs

The URLs CMSMS will create "out-of-the-box" appear similar to www.website.com/index.php?page=contact
It is functional, but some people find they lack aesthetic value. "Pretty URLs" (also known as Search Engine Friendly or SEF URLS) are an option for improving the appearance of the URL, and some SEO specialists find it may improve search engine indexing (your mileage may vary).

   For the Apache Webserver

Step 1

Copy the file "htaccess.txt" from the doc folder to the root of your website.
Rename the file to ".htaccess" (Note the dot in front of htaccess).

The htaccess.txt file distributed with CMSMS contains other optimizations that are often useful for production websites. It may be useful to read this file and understand its contents.

Step 2

Add to the bottom of your website's config.php:

$config['url_rewriting'] = 'mod_rewrite';

And optionally a page extention, for example:

$config['page_extension'] = '.html';

Some people prefer using a "/" as a page extension. In this case you will need to enable some of the optional rewrite rules that are commented out by default in the distributed htaccess.txt file.

Step 3

The head section of your HTML template should contain the tag:

{metadata}

Step 4 - Optional

Is your CMSMS installation placed in a subdirectory of your server root, i.e. website.com/subfolder/ you need to change this setting in the .htaccess file:

# If your CMSMS installation is in a subdirectory of your domain, you need to specify the relative path (from the root of the domain) here.
# In example: RewriteBase /[subdirectory name]
RewriteBase /

into:

# If your CMSMS installation is in a subdirectory of your domain, you need to specify the relative path (from the root of the domain) here.
# In example: RewriteBase /[subdirectory name]
RewriteBase /subfolder

Step 5

Clear the site cache. Go to "Site Admin" >> "System Maintenance" in the CMSMS admin console. Under the Cache and content tab, click the "Clear" button under "Clear Cache".

We recommend that the CMSMS cache be cleared every time the config.php is modified.

Your url will look like www.website.com/contact or www.website.com/contact.html


   Windows and other webservers

Step 1

Add to the bottom of your websites config.php:

$config['url_rewriting'] = 'internal';

Step 2

The head section of your HTML template should contain the tag:

{metadata}

Again, we recommend that the CMSMS cache be cleared.

Your url will look like www.website.com/index.php/contact