2010-08-20 49 views
0

我正在努力強制HTTPS,並且如果用戶使用HTTP,則重定向用戶。出於某種原因,我重寫規則對我的督促ENV的偉大工程,但不是我的dev的,那就是:使用IIS和ISAPI重寫強制HTTPS

# Redirect HTTP to HTTPS# redirect all http requests to https 
RewriteCond %HTTPS (?!on).* 
RewriteCond Host: (.*) 
RewriteRule (.*) https\://$1$2 [I,RP] 

PROD上它的偉大工程,它會將用戶重定向。在開發,它沒有,但顯示了這個很奇怪頁:

-cache 
Content-Type: text/html 
Content-Length: 161 
Location: https://blahblah.mainblah.com/ 

<html><body>The requested resource was moved. It could be found here: <a href="https://blahblah.mainblah.com/">https://dev-notebox.intuit.com/</a></body></html> 

有沒有人看到了這一點,或有什麼是怎麼回事任何想法/指針?

感謝

+0

您使用的是什麼版本的IIS? – 2010-08-21 00:11:22

回答

0

除了使用重寫的,你可以使用<cflocation>如果頁面從http請求。檢查Application.cfc的onRequestStart()中的CGI範圍。純CFML解決方案可以在所有Web服務器上工作。