Joomla – Enabling Search Engine Friendly (SEF) URLs on IIS

(1) Add rules as below in isapi

RewriteEngine On
RewriteCond %{REQUEST_URI} (/[^.]*|\.(html?|php))$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php

(2) add link as below in index.php

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

Bingo 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *