URL Rewriting – Top Rules

Here is the URL Rewrite Rule in the IIS web.config file Make sure you replace example.com with the name of your domain.

01. To always remove trailing slash from the URL:

<rule name=”Remove trailing slash” stopProcessing=”true”>
<match url=”(.*)/$” />
<conditions>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
</conditions>
<action type=”Redirect” redirectType=”Permanent” url=”{R:1}” />
</rule>

02. To always add trailing slash to the URL:

<rule name=”Add trailing slash” stopProcessing=”true”>
<match url=”(.*[^/])$” />
<conditions>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
</conditions>
<action type=”Redirect” redirectType=”Permanent” url=”{R:1}/” />
</rule>

03. Redirect Non-WWW to WWW:

<rulename=”Redirect to WWW”stopProcessing=”true”>
<matchurl=”.*”/>
<conditions>
<addinput=”{HTTP_HOST}”pattern=”^example.com”/>
</conditions>
<actiontype=”Redirect”url=”http://www.example.com/{R:0}”redirectType=”Permanent”/>
</rule>

 

Posted in URLRewrite | Leave a comment

Buy 1 get 1 offer on Snapdeal.com

Snapdeal.com is an online marketplace, headquartered in New Delhi, India.

Diwali discount: buy 1 get 1 offer on canon & nikon cameras on snapdeal.com.

http://www.snapdeal.com?utm_source=aff_prog&utm_campaign=afts&offer_id=17&aff_id=18165



Posted in Shopping | Leave a comment

Get Extra Cashback & 100% FREE

Get Extra Cashback & 100% FREE Coupons & Discounts for Flipkart, Myntra, Amazon, Jabong, Yatra, Shopclues & 500 more brands! Highest savings possible – Join free & save!

 

 

 

 

 

 

 

 

 

 

 

Posted in Shopping | Leave a comment