Mindset Graphics

Global Menu

SEF URLs on IIS6 with Joomla 1.5

We have been working on this Joomla 1.5 fix for a number of days now.  After countless forums, sites, loopbacks, recycled content and some info dating back to 2005...

Most of the URL rewrite info for Joomla is only applicable to Joomla 1.0 or weren't complete.  Even the information from the Joomla site itself seemed confusing. Finally, it seems to have all come together from a whole pile of resources.  We thought we might save someone the troubles of what we went through.

Our Configuration is Windows Server 2003, IIS6 and PLESK.

-----------------------------------------------------------------------------------------------------------------------------------------------------

You may need to add additional lines to IIRF.ini for plugins that don't work with SEF

-----------------------------------------------------------------------------------------------------------------------------------------------------

**The URL Rewriter is now installed for our clients server wide, so they now have this additional functionality.**
(our hosting clients can skip to step #3 )

1) Download IIRF URL Rewriter. http://iirf.codeplex.com/ (opens a new window)

2) Follow their installation instructions for installing into IIS6.  (they're really straight forward.)

3) Create an IIRF.ini file in the root directory of your web site.

4) Populate IIRF.ini with the following:

RewriteCond %{HTTP_URL} (/|\.htm|\.php|\.html|/[^.]*)$ 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.php [U,L]
RewriteRule ^/administrator - [L]

 

RewriteRule ^/$ /index.php
RewriteRule ^/content/([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/ /index.php?option=com_content&task=$1&id=$2&Itemid=$3&limit=$4&limitstart=$5
RewriteRule ^/content/([^/]+)/([^/]+)/([^/]+)/ /index.php?option=com_content&task=$1&id=$2&Itemid=$3
RewriteRule ^/component/option,([^/]+)/([^/]+),([^/]+)/([^/]+),([^/]+)/([^/]+),([^/]+) /index.php?option=$1&$2=$3&$4=$5&$6=$7
RewriteRule ^/component/option,([^/]+)/([^/]+),([^/]+)/ /index.php?option=$1&$2=$3 

 

5) Edit and save your configuration.php file to reflect the following:

    var $live_site = 'http://YOURDOMAIN';

6) Insert the following just after the very first

 

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

7) In your Joomla Server Configuration Options, You enable Joomla SEF, Apache Rewrite and optionally the Extensions buttons.

8) You're done.

We found it took effect a few moments after we reset the FTP password in PLESK which resets the permissions structure on your whole site.

**If you have any further information, comments or corrections about this article, please let us know!