Friday, 30 May 2008

CMS Made Simple (CMSms) Pretty URLs

I've finished and submitted my dissertation, completed my temporary contract at work, and started to set myself up as self-employed. All of these things mean that I have some time available to actually get to grips with CMSms and improve my online presence. Understandably this is a high priority for me now that I am self-employed. I will be able to use the Web as a marketing tool to potential clients.

Having successfully installed CMSms on my webhost's server there was some configuring that needed doing before I can get it going. Just like the installation process caused me problems on my Yahoo! server, so has the configuration steps.

All I wanted to do was have nice clean Web addresses (URL) for my pages. My dissertation project homepage should logically be
maakusan.com/msc
but the content management system that I have chosen turns out to churn out ugly URL. This is understandable given that it works from a MySQL database. If I create a new page, the database stores it away. When a Web browser goes for the page it has to wade through the database to find the page.
http://www.maakusan.com/index.php?page=msc

CMSms has two ways to clean the URL as explained in both the Installation/Optional Settings instructions and the Pretty URLs FAQ. mod_rewrite will make it look like
http://www.maakusan.com/msc/
BUT mod_rewrite requires the htaccess file to be edited on the web server. Yahoo does not allow clients to upload or edit their own htaccess file (Yahoo Small Business Help). So I can't use mod_rewrite.

The alternative way to clean up URL in CMSms is to use its internal mechanism. This does not need me to play with the htaccess file but only tidies the URL to look like
http://www.maakusan.com/index.php/msc

which is just not clean enough.

I have resolved to try to create redirect pages at clean URL that will point to the dirty URL.

In the meantime, if anybody does use CMSms on a Yahoo webhost package and they wish to try to have clean URL then you HAVE TO use the CMSms internal mechanism. Here are some steps to follow to make it happen.

  1. Log into Yahoo Small Business.
  2. Go to the Web Hosting Control Panel.
  3. Go to the Manage tab.
  4. Go to the File Manager.
  5. Click on the edit button for the config.php file.
  6. Scroll down the file to the URL Settings.
  7. Change $config['internal_pretty_urls'] = false;
    to read $config['internal_pretty_urls'] = true;
  8. Press Save.
  9. Log into your CMSms admin pages for your domain.
    http://www.example.com/admin/
  10. Go to Site Admin.
  11. Go to Global Settings.
  12. Next to Clear Cache:
    press Clear.
That's it.

These 'simple' twelve steps took me too long to work out. I've spent three days trying to get this sorted. One major stumbling block was the fact that I deleted the index.php file.
DO NOT DELETE IT. You MUST KEEP the index.php provided with the CMSms installation. Otherwise none of your pages will be found. Dunno how it works. Don't ask. Just know that it will not work if you delete it. You can edit it from the original, but don't delete it. Even if you already have an index.html file setup and want to use that to start with... DON'T! Edit the DEFAULT Home page within CMSms to look like your index.html file.

In the meantime I did find out about Joomla and Drupal. These are two competitors to CMSms and to be honest I was very close to uninstalling the three installations that I have for CMSms and moving over to Joomla only because of the number of Joomla books that I found on Amazon.

If the redirect page idea does not work, then my last resort will have to be moving to Joomla.

0 comments: