Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In IIS 7, is there a way to set two urls on the same site to allow http and https, and the rest to be https only?

 - http://mysite/url1 or https://mysite/url1 is accepted and stays on that protocol.
 - http://mysite/url2 or https://mysite/url2 is accepted and stays on that protocol.
 - any other item, i.e. http://mysite/whatever redirects to https://mysite/whatever
 - https://mysite/whatever is accepted.

Edited because first question wasn't clear enough.

share|improve this question
1  
You should be able to set which protocol each site uses under its settings. –  Jake Elsley Sep 28 '12 at 10:48
add comment

2 Answers

up vote 1 down vote accepted

The most friendly way to do this is with IIS URL Rewrite since it won't throw an error if they arrive by HTTP but it will redirect to HTTPS for them. You can set the rule to redirect to https for all pages except for the 2 that you need (and any images, css, or other dependencies that can also remain HTTP).

Here's a link to get started: http://tinyurl.com/4lj4v5g.

share|improve this answer
add comment

Yes, if you select the Site in IIS and in the Action pane on the right hand side select Bindings and then bind the site to the port 443(HTTPS).

You can then go to the SSL Settings icon and select Require SSL and then add a certificate to the website.

It is worth noting you can only have a single HTTPS website per IP address on a box unless you use a reverse proxy like Pound.

share|improve this answer
1  
You can also bind multiple IP addresses to a single network interface if you need more https web sites. –  jftuga Sep 28 '12 at 12:35
    
I don't think this solves the problem. I'm edited the question to try and be clearer. –  Martin Clarke Oct 1 '12 at 8:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.