2013-11-05 39 views
1

我試圖讓我的http頁面https。我想改變的頁面是http://dtesolar.ca/estoreWordpress htaccess重定向從http到https單頁

我希望我可以有https而不是http。我已經購買了SSL證書,我使用的是用於wordpress的HTTPS插件,但它不起作用,所以我打算使用.htaccess文件來完成它,但不確定語法。

這裏有htaccess文件默認的事情:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 

</IfModule> 

# END WordPress 

請幫幫忙!

回答

0

有你的.htaccess這樣的:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/

# force HTTPS for store 
RewriteCond %{HTTPS} off 
RewriteRule ^estore/ https://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301] 

RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 

</IfModule> 

# END WordPress 

PS:您將需要修復的這個HTTPS URL您的JS,CSS和圖片鏈接。

+0

感謝您的回覆。如何修復鏈接? – katwhocodes

+0

那麼https頁面應該只使用https使用CSS,js文件。 – anubhava

+0

我應該在哪裏修改? – katwhocodes