Wednesday, March 9, 2011

IIS URL Rewrite Module - Redirect HTTP to HTTPS with IIS 7

Using IIS URL Rewrite Module, Web administrators can easily set up rules to define URL rewriting behavior based on HTTP headers, HTTP response or request headers, IIS server variables, and programmatic rules. Here the main purpose is to implement URLs that are easier for users to remember and easier for search engines to find.

In addition, we can define rules to force SSL on selected pages of a Website which is hosted in IIS 7. First of all we need to install Microsoft URL Rewrite Module in IIs. Then we need to install SSL certificate, create HTTPS bindings to our IIS Web site and assign the certificate. Then select our Web site under Sites node and make sure "Require SSL" is NOT checked under SSL Settings.

After that we have to add following config section to the web.config file in the Web site root directory.
















In here a rewrite rule is defined by specifying a pattern to use for matching the URL string and an action to perform if a pattern is matched. In addition an optional condition is also specified which will be checked in the matching step.

Thanks Carlos Redondo for your suggestion!

14 comments:

SEO Services said...

I has been additionally pleased. Good perform! pdf to ppt converter

Anonymous said...

car cover Thanks for share this wonderful information with us.

Anonymous said...

Carhartt Seat CoversVery nice info thanks for share this useful info with us.

Anonymous said...

Car Seat Covers Very informative post thanks for share this info.

Anonymous said...

car covers Very informative post thanks for share this info.

SEO Services said...

Good post but I was wondering if you could write a litte more on this subject? I’d be very thankful if you could elaborate a little bit further. digital visiting cards

SEO Services said...

Wow! This could be one of the most useful blogs we have ever come across on thesubject. 2captcha bot

RiseSEO Company said...

The worst part of it was that the software only worked intermittently and the data was not accurate. Anti captcha key

Jewellery said...

I lack the words to express my gratitude for this post. I was quite pleased by this essay, and the author is a wonderful person. I appreciate you sharing this with us. jewellery Dubai

Waseem said...

I think this is a really well-written article. maintain your wonderful work, guy. Keep going jewellery Kuwait

BE IN THE FASHION said...

100% informative article. Read more about pakistani wedding dresses for mens,.

Anonymous said...

I adore the way you write, and I appreciate the useful information you have provided. Mehndi design for special occasions

Anonymous said...

Excellent Post. Thank you for sharing this article. Both others and myself will find this to be of great use. You wrote a really interesting and well-written piece. Please continue to share these posts. Engagement Rings Gold for Couples

Waseem said...

The most excellent piece I stumbled across several years, and I wrote anything on this page about it. visit our weblink