Sunday, March 22, 2015

Url Redirection by wildcard Regular Expression - Part II

Hi Readers,

This article is extension to below article where I have provided guidance on how to

redirect URL using URL rewrite utility ( and create vanity URLS in your organization.

Now we want that anything in "Name + suffix" that hits the IIS url rewrite rule gets redirected to URL .



Create a blank rule, use "Matches the Pattern" and "Regular Expressions"

In Pattern use -->   (.*)


In conditions add as in below screen shot, Notice caret has been added in front of ^sccm.


Last step is create an action to redirect to a particular URL.


Now NAME + any Suffix that you will point  to URL rewrite IIS server in DNS will redirect to the URL mentioned in the Action.

In above example:

if URL rewrite IIS server where you have created the redirection rule is:

than you have to create a DNS A records  --> -->

This URL rewrite approach will assist you in streamlining your organizations vanity url process.


Sukhija Vikas


  1. Hi Vikas,

    I won't rather prefer to have Apache module (like Helicon) on top of IIS and use .htaccess based redirection rules (with same regular expressions). They are quite easy to maintain & update.

    Seems probably, that is something Microsoft learned from Apache. Though, being a developer in .NET technologies at start of career, I have a strong affinity to .htaccess based web server configuration now.

    See few easily tips & tricks, for example, that can be accomplished through .htacess which can not be that straight forward in IIS on the link below:

    Anyways.... its an informative post :)

  2. Thx Sachin for sharing Apache side of the things...We ITIS guys prefer IIS instead of Apache.. :)