重定向從HTTP登錄頁面HTTPS我希望我的用戶誰鍵入login.abcde.com
被重定向到https://client1.abcde.com
並阻止其他所有的HTTP URL。所以如果有人輸入http://client1.abcde.com/thispage/isawesome.html,它會顯示一些錯誤消息或404。到目前爲止,我嘗試將以下內容添加到我的httpd.conf中,但沒有成功。我不斷收到的Apache網頁說法:This page is used to test the proper operation of the Apache HTTP server after it has been installed. If you can read this page, it means that the web server installed at this site is working properly, but has not yet been configured.
通過httpd.conf中
RewriteEngine敘述上
的RewriteCond%{} HTTPS關閉
重寫規則^ client1.abcde.com $ https://client1.abcde.com [L,R = 301]
我正在使用Apache的方式,與WSGI。我對80端口的虛擬主機基本上是:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /srv/www/abcde/html
ErrorLog "logs/error_log"
CustomLog "logs/access_log" common
</VirtualHost>