This article is extension to below article where I have provided guidance on how to
redirect URL using URL rewrite utility (download from Microsoft) 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: 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.
2 thoughts on “Url Redirection by wildcard Regular Expression – Part II”
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 🙂
Thx Sachin for sharing Apache side of the things…We ITIS guys prefer IIS instead of Apache.. 🙂