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" />

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s