IIS 7 – 允许http的部分网站,HTTPS的rest?

IIS 7 ,是否有一种方法可以在同一个站点上设置两个urls来允许httphttps,其余的只能是https

  - 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, ie http://mysite/whatever redirects to https://mysite/whatever - https://mysite/whatever is accepted. 

编辑是因为第一个问题不够清楚。

最好的方法是使用IIS URL重写,因为如果HTTP到达,它将不会引发错误,但会redirect到HTTPS。 您可以将规则设置为redirect到https,除了您需要的2以外的所有页面(以及任何图像,C​​SS或其他依赖项也可以保持HTTP)。

这是一个开始的链接: http : //tinyurl.com/4lj4v5g 。

是的,如果您在IIS中select“站点”,并在右侧的“操作”窗格中select“绑定”,然后将站点绑定到端口443(HTTPS)。

然后,您可以转到SSL设置图标并select需要SSL,然后向该网站添加证书。

值得注意的是,除非您使用像Pound这样的反向代理服务器,否则每个IP地址只能有一个HTTPS网站。