Creating Search Engine Friendly URLs in Mambo 4.5
-
Mambo 4.5 has in-built functions to create search engine friendly URL’s. Most search engines don’t index sites with query strings in the URL. To overcome this, most CMS systems have in-build systems that allow you to clean the URL to make it search engine friendly. For example take the following URLs as an example:
http://project.com/index.php
http://project.com/index.php?option=com_view&task=view&article=4
Most search engines don’t index the inner pages with URL’s like the one above since they assumes that it’s part of index.php. All Mambo pages refer to index.php, so most of the inner contents don’t get indexed on a search engine.
Let’s get to Mambo’s SEF feature to create search engine friendly URLs.Using the SEF feature in Mambo 4.5+, you can convert the above URL to
http://project.com/components/option,com_view/task,view/article,4/
The search engines will index this type of URL, since index.php is not referred to in this and each URL like this is unique.What do you need to use SEF?
- 1. You’ll have to check if your installation of Apache has mod_rewrite enabled for your site, you can check this using the phpinfo() function.
- 2. Check of your server allows .htaccess override for your site.
To enable SEF in Mambo, you’ll first need to rename htaccess.txt in the Mambo installation directory to .htaccess .Then edit configuration.php and set
$mosConfig_sef= "1"In order to get the SEF URL working site wide, you’ll need to modify all the URL’s in your components, modules and templates to make it SEF. Mambo has an in-built function sefRelToAbs which converts regular url to a SEF url. If your existing URL looks like this:
index.php?option=com_view&task=view&article=4
you can convert this to SEF using the function as follows:
echo sefRelToAbs("index.php?option=com_view&task=view&article=$articleid");This will convert the original URL to :
http://project.com/components/option,com_view/task,view/article,4/
























January 2nd, 2006 at 6:41 pm
quite interesting !!
August 21st, 2007 at 12:02 pm
Still dont you think the URL’s can be made better? as it has ‘,’ (comma) in it, it is still not 100% SE friendly.
I have built 2 CMS’s on wordpress and I feel its a better choice considering SE friendliness over Mambo or Joomla.
August 21st, 2007 at 2:09 pm
Yeah - the Mambo SEF implementation leaves a lot to be desired. Wordpress is a good option for Blogs, but lacks lot of other pre-made components which are available for Mambo / Joomla.