2017-09-04 80 views
0

我在我的.htaccess文件中有以下內容。我正在使用Real Simple SSL插件。在我的網站上,HTTP沒有被重定向到HTTPS。不太確定可能是什麼問題。HTTPS重定向Wordpress

Order Deny,Allow 
Deny from xx.xx.xx.xx 
<IfModule mod_rewrite.c> 
RewriteEngine on 
RewriteCond %{HTTP_HOST} =mysite.com 
RewriteRule (.*) http://www.example.com/$1 [R=301,L] 
RewriteCond %{SERVER_PORT} 80 
RewriteCond %{REQUEST_URI} wp-admin 
RewriteRule ^(.*)$ https://www.example.com/wp-admin/ [R,L] 
</IfModule> 

以下是Real Simple SSL設置的Admin門戶的屏幕截圖。

enter image description here

回答

0

使用您.htaccess這個規則:

<IfModule mod_rewrite.c> 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^yoursite.com [NC] 
RewriteRule ^(.*)$ https://yoursite.com/$1 [L,R=301] 
</IfModule> 
+0

難道我這個添加或編輯我張貼的問題嗎? – codeNinja

+0

替換您的現有 –