However, if you later need to create more complex rules, regex may be necessary.įor this demo select Wildcards. Use wildcards if you aren’t familiar with regular expressions since they are much more intuitive. In the “Using” dropdown box you can choose between Regular Expressions and Wildcards. Here you’ll have a choice from a few wizard options, and with URL Rewrite 2.0 you can also create outbound rules. Next, click on “Add Rules…” from the Actions pane. First, open IIS Manager and double-click on the “URL Rewrite” icon. I’ll show both, starting with IIS Manager. You can choose to create the rules using IIS Manager, or using a text editor and updating web.config directly. Either will work for a domain name redirect like this. Where you apply it is really up to how you manage your server. URL Rewrite works at the global level, or site level (or application level for that matter). For this walkthrough and screenshots I’ll use URL Rewrite 2.0 RC1, but everything that I’ll cover also works for version 1.0 and 1.1. The goal is to set a permanent 301 redirect. Many people are doing this for search engine optimization (SEO) so that search engines only see the one site, rather than two sites. One common use of URL Rewrite is redirecting to. If you’re using IIS 7.0 (or 7.5), URL Rewrite is a valuable tool, well worth installing and using.
0 Comments
Leave a Reply. |