IIS Mod-Rewrite solutions
Overview Documentation Download Purchase FAQ  
IIS Mod-Rewrite - URL rewrite tool for IIS

Search Engine Friendly (SEF) URLs for Joomla on IIS using .htaccess

23 Dec 2008

This article describes a detailed, step-by-step guide for enabling Search Engine Friendly URLs on Joomla on IIS web server

This solution requires IIS Mod-Rewrite Pro and IIS 6.0 or later, and it is tested with Joomla 1.0 and 1.5, PHP 5.2.4, and MySQL 5.0.24.

To enable SEF URLs on Joomla on IIS, follow these steps:

  1. Install PHP following the vendor's instructions.

  2. Install MySQL Server following the vendor's instructions.

  3. Install IIS Mod-Rewrite Pro (download).

  4. If on production environment, activate IIS Mod-Rewrite using a valid license key. If activation is skipped, IIS Mod-Rewrite will work in test mode and you will need to restart IIS every 30 minutes or 1000 requests, if your testing exceeds these limits.

  5. Install Joomla according to the vendor's instructions.

  6. Open with a text editor the file index.php, located in Joomla root directory.

  7. Add the code line

    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];

    at the beginning of index.php script. After adding this line of code, the beginning of index.php script should look like this:

    <?php
    $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL'];
    ...
    ...

  8. Locate the file htaccess.txt in Joomla root directory and rename it to .htaccess. Since Windows Explorer will not accept the file name .htaccess, to rename the file open a command prompt window (cmd.exe), change directory (cd) to Joomla root, and run the following command:

    rename  htaccess.txt  .htaccess

  9. Make sure IIS has sufficient access rights to the file .htaccess. The user group IIS_WPG (if running on IIS 6), or the user group IIS_IUSRS (if running on IIS 7), or the current Application Pool's Identity User must have at least "read" access rights to the ".htaccess" file or to the directory that contains this file.

  10. Log on to Joomla as administrator, go to admin panel and open the "Global Configuration" page.

  11. If running Joomla 1.5, in the "SEO Settings" section, choose "Yes" for the fields "Search Engine Friendly URLs", "Use Apache mod_rewrite", and "Add suffix to URLs", so that you enable full SEF URLs. Ignore the warning saying that the option "Use Apache mod_rewrite" is only for Apache users. IIS Mod-Rewrite Pro fully emulates Apache mod_rewrite, so you must enable this option in order to get full SEF URLs.

    If running Joomla 1.0, in the "SEO" section, choose "Yes" for the fields "Search Engine Friendly URLs", and "Dynamic Page Titles", so that you enable full SEF URLs. Ignore the warning saying that the option "Search Engine Friendly URLs" is only for Apache users. IIS Mod-Rewrite Pro fully emulates Apache mod_rewrite, so you must enable this option in order to get full SEF URLs.

After, completing all the steps above, your Joomla installation will fully serve Search Engine Friendly URLs, and your website's SEO will be drastically improved.

 
 
Download and try
IIS Mod-Rewrite
NOW!


IIS rewrite

Download IIS Mod-Rewrite

Purchase IIS Mod-Rewrite