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 (http://www.microsoft.com/en-us/download/details.aspx?id=7435) and create vanity URLS in your organization.

http://msexchange.me/2012/09/28/url-redirections-process-made-easy/

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

Example:-

sccm

sccm.labtest.com

sccm.labparent.labtest.com

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

In Pattern use –>   (.*)

url1

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

url2

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

url3

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: 10.10.10.56

than you have to create a DNS A records

sccm.labtest.com  –> 10.10.10.56

sccm.labparent.labtest.com –> 10.10.10.56

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

Regards

Sukhija Vikas

http://msexchange.me

Advertisements

2 thoughts on “Url Redirection by wildcard Regular Expression – Part II

  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:
    http://technowide.net/2015/01/06/apache-useful-htaccess-tips-tricks/

    Anyways…. its an informative post 🙂

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s