URL Rewriting

URL rewriting on IIS is possible only when you install URL Rewriting module on the server.

Please follow the link below to download URL Rewrite module for IIS:


URL Rewriting is a rule-based mechanism. After the successful installation of the module, you will be able to see an icon for  “URL Rewrite Module”. Create rules for rewriting URLs as per your requirement.

You can write rules for modifying the URLs individually on each website by adding “WEB.CONFIG” with appropriate code.

Ex : Removing ‘.php’ extension from URLs, code for web.config file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}.php" matchType="IsFile" ignoreCase="false" />
<action type="Rewrite" url="{R:1}.php" />