我正在尝试将我的http页面设置为https。我想要更改的页面是http://dtesolar.ca/estore
我希望我可以使用https而不是http。我已经购买了ssl证书,我正在使用HTTPS插件进行wordpress但是它不起作用,所以我想使用.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 :(得分: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网址上修复JS,CSS和图片的链接。