The Quick Guide To Search Friendly URLs in CMS Made Simple
Written by webchicklet on March 31, 2008 – 12:37 pm -I’ve mentioned before that my favorite easy CMS is CMS Made Simple (CMSMS). One of the reasons I love it is because it can create search-friendly URLs. What is that and why does it matter?
What is a search-friendly URL?
A search-friendly URL is one that makes it easy for search engines to index and understand what a page is all about. For example, www.yoursite.com/blue-widgets/ tells Google, Yahoo!, etc. that the page blue-widgets is about “blue widgets”.
Why does it matter?
Search-friendly URLs gives a page an extra chance to rank well for that phrase. Many CMS’s will create URLs like this:
www.yoursite.com/id=128483&catno=82746&colid=7373
That makes it just a little harder for that page to rank for “blue widgets” than it would for the search-friendly URL. In addition, search-friendly URLs are also visitor-friendly, and that’s always a plus.
So, in general, search-friendly URLs are usually implemented by utilizing a module on Apache servers called “mod_rewrite”. (You don’t need really need to understand that at all. I just mention it as an FYI). CMSMS, in particular, allows you to control this mod_rewrite action by editing two files. And while CMS Made Simple has documentation for editing these files here, it can be a little daunting for anyone without any experience to read that page. The actual implementation is actually very easy, however, so I decided to give you the Quick Guide instead. You can read the real documentation later if you just want to expand your horizons.
So, here’s all you need to do after installing CMS Made Simple in order to get search-friendly URLs for all your pages.
1. Create an .htaccess file consisting of 4 lines and upload to the server.
Open notepad or any text editor on your computer and copy/paste the following into a new text document. (Don’t use Microsoft Word, please.)
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+)$ index.php?page=$1 [QSA]
Now click on File / Save and save the document to your desktop with the name “.htaccess”
Notice that I put .htaccess in quotes. You should too. Why? Because without the quotes, it may save it with .txt at the end of the name, and you don’t want that. The name MUST BE .htaccess (nothing before the period, and nothing after htaccess).
2. Edit config.php to match the following three lines and upload to the server.
Now, again using Notepad or text editor, edit the config.php file that came with the install files of CMSMS. Look for the URL Settings section of the file. Find the following lines and edit them so that they are set to true, false, and true, respectively, as shown below.
$config['assume_mod_rewrite'] = true;
$config['internal_pretty_urls'] = false;
$config['use_hierarchy'] = true;
Upload both of those files to your server (in the root directory, or the same directory where config.php currently lives), and your new site will be using search-friendly URLs from then on.
Tags: CMS Made Simple, CMSMS, mod_rewrite, search-friendly URLs
Posted in CMS Made Simple |
















July 17th, 2008 at 7:31 am
i was just searching for an easy way to do this on cmsms..
tnx for the tip
July 22nd, 2008 at 5:39 pm
This is so cool and save me tons of time trying to figure what module to download.
It even works for News section. Awesome!
Just found out CMS made simple yesterday. It’s much easier than Joomla and Drupal, which gave me so much headache.
Thanks a million!
July 23rd, 2008 at 12:01 am
I am creating a website http://21cmedia.co.uk/
This domain name is hosted with 1&1, and in the 1&1 control panel I have pointed this to my 1&1 ‘Home Directory’ ‘21cmedia/’ - this is different to using 1&1’s ‘Forward your domain’ option which I believe is used more for external sites? - I would prefer to not use frame-redirect as I’m guessing this is not ideal, and probably isn’t SEO friendly?
Anyway, what I want is for my pages to look like ‘http://21cmedia.co.uk/serives/’ for example, but despite following the above instructions this is not working - any suggestions?
July 23rd, 2008 at 12:11 am
it’s ok, I’ve figured it out now.
August 21st, 2008 at 4:59 pm
What about using CMSMS MLE ? It not working
Have anybody any solution ? using one language it working, bet then i enable RewriteEngine On then i cannt swith content clicking on flags what chage a content in diferent language..
sad..
August 21st, 2008 at 7:12 pm
Sorry, domas, I’m not sure what you are asking. You’re saying that if you have ReWriteEngine On, that you can’t change to a different language? I can’t imagine why that would happen. I guess it depends upon what clicking on a flag actually does…what does the url look like for each flag?