Getting Started Walk-Through

Enough talking! Let's perform a simple walk-through so that you can see URL Rewrite in action and get a feel for how the rules really work. The following walk-through creates a Canonical Domain Name rule to redirect from localtest.me to www.localtest.me. There is also a template for this particular situation, which we'll cover later.

Note
The domain localtest.me and all subdomains point to the loopback IP address 127.0.0.1. As long as you have Internet access, you can use it for testing on your local machine, without any special DNS configuration. You can set the appropriate bindings on your IIS sites and immediately start testing. We'll use that for a number of examples in this chapter. If you don't have Internet access on your test machine, add all test URLs to your hosts file first.

For this example, you will create the rule at the site level so that it doesn't impact anything else on the server, and use the Wildcards match syntax since it's straightforward for the first walk-through. You'll use IIS Manager as the tool to create the rules since it gives the best visual way to understand the rule structure.

First, let's get started by setting up a test site for this and further examples in this chapter. To set up the test site, perform the following steps:

1. To ensure that User Account Control (UAC) doesn't fight with you, you can grant your user specific Full Control permissions to the c:\inetpub folder. UAC ignores your membership in the ...

Get Professional Microsoft IIS 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.