Simple as it could be? – CMS Made Simple

Simple as it should be? - CMS Made Simple

Setup Pretty URLs also known as Search Engine Friendly or SEF URLS

If anything is not simple then it is a CMS system. No, also the so called simple ones often are just simple for a very specific simple task. And the lack of good and ready-to-use documentation does it's job to be not as simple as it could be.

Step 1: Pre Condition

Your site is up and running and CMS is installed in a subfolder like so:

The default setup for not-so-pretty URL's is as follows:

Links: - main site entry point -  sub menu "download"

But I just want:

So remove the ugly "index.php?page=" thing.


Step 2: Setup config.php for "mod_rewrite" pretty urls first

Edit /cms/config.php on your server via FTP.

It should read like so after editing:

I added

$config['url_rewriting'] = 'mod_rewrite';  # internal mod_rewrite
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = true;

at the end.

# CMS Made Simple Configuration File
# Documentation: /doc/CMSMS_config_reference.pdf
$config['dbms'] = 'mysqli';
$config['db_hostname'] = 'localhost';
# [some other settings here, omitted]
$config['url_rewriting'] = 'mod_rewrite';
$config['internal_pretty_urls'] = true;
$config['use_hierarchy'] = true;

Now, the links should read:

So this killed the "index.php?page=" thing.

But sill also works - but because this is not used internally and not for the menu, I think Google search engine will know anything about this...


Handling special characters

Go to Content > content Manager > Navigation, then "Page URL" and enter:


This is stupid, but simple. (If someone knows a solution for special characters beyond 7 bits, please let me know.)

Reload the site on your web browser and the link with special charachters should also work.


Step 3: Add and setup .htaccess.

Copy it form ./docs on your server to  your main folder "/cms/htaccess.txt". Then first edit and then 2nd rename it via FTP to ".htaccess".


# The following is to enable pretty URLS, only applicable if url_rewriting is set to 'mod_rewrite' in the config.php
<IfModule rewrite_module>
RewriteEngine on
# If your CMSMS installation is in a subdirectory of your domain, you may need to specify the relative path (from the root of the domain) here.
# i.e: RewriteBase /cmsms
RewriteBase /cms

# Rewrites urls in the form of /parent/child/grandchild 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]


NOTE: This does only ADD the "index.php?page=" to a url in the background hidden from any external url access call that does not have the index.php?page= thing in it!


Now this works, as before without any .htaccess:  -- but never link to this url


HINT: You may also need to clear your web browser cache and rebuild the php cache within your CMS!



Site logo and site icons

Next thing is icon and site-logo - you have to program and change the template ... there is no user interface for that. Including you have to render and downscale icons.




Schreiben Sie einen Kommentar

Ihre E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Scroll to Top