Redirect LiveCompare URL (from machine to livecompare app)

In these two posts (part1 and part2) I explore how to enable SSL on the LiveCompare server and automatically redirect http to https. A customer recently asked how they could take a URL of the form:

<scheme>://<machine>

and redirect automatically to the livecompare web app. That is redirect to:

<scheme>://<machine>/livecompare

We can do this by writing another URL Rewrite rule.

Start IIS Manager. Expand the hierarchy and select Default Web Site.

  

Double-click the URL Rewrite icon to open the feature.

Click Add Rule(s)...

 

Select Blank rule and click OK.

Enter a Name. I used Root to LiveCompare.

Requested URL: Matches the Pattern

Using: Regular Expressions

Pattern: ^$

Ignore case: Checked

Action type: Rewrite

Rewrite URL: /livecompare

Append query string: Checked

  

Click Apply.

If you also have the http -> https rule, make sure it comes first in the list. You can use the Move Up/Move Down links to re-order the rules.

Since both rules are setup to return a permanent redirect status, you should test them with a new incognito window (Chrome) to avoid any browser cache effects.