By default Joomla uses query string parameters for all the links URLs it
generates for your web site. This behavior can be changed by enabling what is
called "Search Engine Friendly URLs" in Joomla. However, this feature relies on
the URL rewriting functionality to be available on the web server. IIS 6.0 does
not have URL rewriting capabilities, so you could use one of the third party URL
rewriting products, such as ISAPI_Rewrite or Ionics ISAPI Rewrite Filter. IIS
7.0 has URL rewriting support, which can be enabled by installing Microsoft URL
Rewrite Module for IIS 7.0. The following instructions describe how URL Rewrite
Module for IIS 7.0 can be used to enable Clean URLs in Joomla.
First, you
will need to download and install Microsoft URL Rewrite Module. Once it has been
installed, create and open a web.config file located in
C:\inetpub\wwwroot\Joomla folder. Paste the following XML code into this
file.
| <?xml
version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Security Rule" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAny"> <add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" /> <add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" /> <add input="{QUERY_STRING}" pattern="(\<|%3C).*script.*(\>|%3E)" /> <add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" /> <add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" /> </conditions> <action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> </rule> <rule name="SEO Rule"> <match url="(.*)" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" /> <add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" /> <add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" /> </conditions> <action type="Rewrite" url="index.php" /> </rule> </rules> </rewrite> </system.webServer> </configuration> |
Save the web.config file and then open web browser and logon to the Joomla administrator console at http://localhost/joomla/administrator/ . Once logged on, go to Site --> Global Configuration menu configure SEO settings as below:
Tags: -
Related entries:
Last update: 2010-03-01 06:13
Author: Jason Scavarda
Revision: 1.3