Search Engine Friendly (SEF) URLs with Mambo CMS

Mambo is the very popular CMS (Content Management System) that supports SEO-friendly URLs. t is designed for usage with Apache Web Server, and it has no default solution to use with IIS and ISAPI_Rewrite. But of course you can use this CMS with IIS Web Server, and ISAPI_Rewrite will help you to enable SE-friendly URLs. This short article describes how to setup Mambo to use with ISAPI_Rewrite 3. In this article we suppose you already have IIS and ISAPI_Rewrite 3 installed. To write the article we used ISAPI_Rewrite 3.1.0.56 and Mambo 4.5.6.

Getting and Installing Mambo

You can download Mambo from this page: http://mambo-code.org/gf/project/mambo/frs/. After downloading please install Mambo according to installation instructions provided by vendor.

Enabling SE-friendly URLs

By default SE-friendly URLs are disabled. To enable this feature please go to Mambo administration panel. On the main page of administration panel please select “Global Configuration”

Picture 1. Mambo’s administration panel.

On the opened page you can see few tabs. Please find “SEO” tab and select it:

Picture 2. “SEO” tab.

Now you can see the configuration for SEO. Please select “yes” for option “Search Engine Friendly URLs”. Then apply and save your settings. Also please go to Mambo installation folder and rename htaccess.txt file to .htaccess.

Picture 3. SEO configuration

Now all URLs on your site are SE-friendly. But the navigation will not work properly. It happens because Mambo uses variable $_SERVER[ ‘REQUEST_URI’ ] which is not supported by IIS.

Patching Mambo

You will need to make a little fix in the Mambo’s source code. Please copy this code to clipboard:

if ( isset( $_SERVER[ 'HTTP_X_REWRITE_URL' ] ) ) {   $_SERVER[ 'REQUEST_URI' ] = $_SERVER['HTTP_X_REWRITE_URL' ]; }

Now you need to find index.php file in the root of Mambo installation folder. Please open this document with any editor and paste the above code at the top of index.php as shown on this picture:

Picture 4. Patched index.php

Done! Now you can use Mambo CMS with pretty SE-friendly URLs. This article describes how to use Mambo with its default rules in .htaccess file, but of course you may replace them.

This entry was posted in ISAPI_Rewrite and tagged . Bookmark the permalink.

Comments are closed.