Enabling Search engine friendly URLs (SEF) on Joomla websites using IIS Rewrite (Reccomended)

To enable search engine freindly urls in joomla you need to do the following

1.  If it does not already exist, create a text file in the web root folder and rename it to  "Web.config". (NB!!   On new websites we have already created a file for this it will be named as "web.config.joomla", you can just rename this file to web.config, as long as there is not already a web.config file, if there is you will need to edit the file with the below code appropriately. If you need help please contact the support desk.

2. Paste the following XML code into this file (do not select the inverted commas above and below).

"

 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="Common Exploit Blocking" stopProcessing="true">
                    <match url="^(.*)$" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" />
                        <add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" />
                        <add input="{QUERY_STRING}" pattern="(\&lt;|%3C).*script.*(\>|%3E)" />
                        <add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" />
                        <add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" />
                    </conditions>
                    <action type="Redirect" url="index.php" appendQueryString="false" redirectType="SeeOther" />
                </rule>
                <rule name="Joomla Search Rule" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="^/search.php" ignoreCase="true" />
                    </conditions>
                    <action type="Rewrite" url="/index.php?option=com_content&amp;view=article&amp;id=4" />
                </rule>
                <rule name="Joomla Main Rewrite Rule" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="(/[^.]*|\.(php|html?|feed|pdf|raw))$" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php/" />
                </rule>
            </rules>
        </rewrite>
        <caching>
            <profiles>
                <add extension=".php" policy="DisableCache" kernelCachePolicy="DisableCache" />
            </profiles>
        </caching>
    </system.webServer>
</configuration>


"  
3) Save the web config file.
4) then login to your joomla administrator area normally   http://www.yourowndomain.co.za/administrator (if you have renamed this folder for security reasons use the new folder name.
5) Click on the menu option marked "Site"
6) Click on the "Global Configuration" option
7) on the right side you will see the SEO Settings.
8) Enable the "Search engine freindly URLS" and "Use Apache mod_rewrite" options b checking them and then clicking save at the top of the menu.

 

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Getting error cant create file, or cant upload files when istalling plugins and modules

If you receive an error indicating that you cant create file/folder , when installing modules and...

if you receive an "infinate loop detected in jerror"

If you receive an error " infinite loop detected in JERROR" you can try the following :...

Fix for Joomla 404 component not found error when accessing the admin area - Joomla 2.5

When accessing the admin area in joomla 2.5 you might receive a "404 component not found...

Display detailed information rather than a generic 500 error

If you are receiving the dreaded 500 error, you can follow the below temporary patches to display...

Sending mail with Joomla websites

1. Enter your Joomla dashboard. 2. Click on "Site", "Global configuration". 3. Choose the...