This has taken me a few days to understand myself. Hopefully a clear explanation of my findings will help you to discover a solution that may work for you.
Remember from
Installation/Optional Settings instructions that there are two ways that you can get CMS Made Simple (CMSms) to do this for you. The ugly URLs that CMSms uses look like this:
http://www.example.com/index.php?page=child
METHOD 1 - mod_rewrite
A pretty URL with mod_rewrite enabled will look like this:
http://www.example.com/parent/child
METHOD 2 - internal mechanism
A pretty URL using the mechanism internal to CMSms will look like this:
http://www.example.com/index.php/parent/child
YOU CAN ONLY CHOOSE ONE METHOD
In order to help you make your choice there are some important things for you to know.
METHOD 1 - mod_rewrite
First of all, the
Pretty URLs FAQ talks about the .htaccess file on your server. "This is the default name of a configuration file that contains 'server directives' (commands known by the server) that tell the server how to behave. One common use for an .htaccess file is to restrict access (password-protection) to specific files or directories on the Internet or intranet, or to specify a particular web page to be accessed when there the file requested by the browser is not found (error 404)." (
Green Web Design Glossary 2008) The Pretty URLs FAQ explains that the htaccess file will rewrite the ugly part of your url, "index.php?page=", to have a pretty .htm ending.
The htaccess file sits on your webhost's server. If you DO NOT have permissions to play with the htaccess file on your webhost's server, then you CANNOT choose the mod_rewrite method to enable pretty URLs.
".htaccess (Hypertext Access)
The name .htaccess refers to the main configuration file for Apache, a popular open-source HTTP server. The .htaccess file can be used to create custom error pages and web page redirects, set up password protection, enable SSI, and more. Yahoo! does not currently allow you to upload .htaccess files to your account." (
Yahoo Small Business Help 2008)
If you do have permission to play with the htaccess file and you wish your pretty URLs to look like
http://www.example.com/parent/child then you have to follow Step 1 of the
Pretty URLs FAQ.
You'll find a suitable htaccess file in your installation of CMSms
/docs/htaccess.txt
Copy it to the folder where you installed CMSms on your server, e.g. /
Rename it .htaccess NO FILE EXTENSION
Secondly, you must edit the config.php file in your installation of CMSms. This is shown in Step 2 of the
Pretty URLs FAQ and also the very beginning of the
Installation/Optional Settings instructions:
Open config.php with you favorite editor (this file has been created by the installer)
Scroll down the file to the URL settings part.
Change $config['assume_mod_rewrite'] = false;
to read $config['assume_mod_rewrite'] = true;
If you want the end of your pretty URL to be .html then also
Change $config['page_extension'] = '/';
to read $config['page_extension'] = '.html';
If you want your pretty URL to be
http://www.example.com/parent/child
instead of
http://www.example.com/child
then also change $config['use_hierarchy'] = false;
to read $config['use_hierarchy'] = true;
It is very important that the htaccess file and config.php make sense to each other. Check out forum posts
http://forum.cmsmadesimple.org/index.ph ... .msg107474
http://forum.cmsmadesimple.org/index.ph ... 8.msg30882
http://forum.cmsmadesimple.org/index.ph ... .msg104175
for more info.
METHOD 2 - internal mechanism
As far as I understand from the
Installation/Optional Settings instructions, all you need to do to make your pretty URL like this
http://www.example.com/index.php/parent/child
Open your config.php file.
Scroll down the file to the URL settings part.
Change $config['internal_pretty_urls'] = false;
to read $config['internal_pretty_urls'] = true;
SUMMARY
Personally I am just going to put up with the CMSms ugly URL and put in redirect pages at pretty URL that point browsers to the ugly URL. I've
blogged the issues I had with the
ftp installation procedure, I'll blog these
pretty URL issues, and also blog how I get on with pretty URL redirect pages.
Wish me luck.