我希望你能帮我用下面的htaccess重写规则。htaccess wordpress https重写规则
# BEGIN WordPress
# WPhtc: Begin Custom htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
我最近改变了从http我的WordPress网站到https ......问题是,旧的URL重定向到一个域名,而不是该页面的HTTPS版本
如
如果我访问以下页面https://domain.com/test/testing/
它工作100%,现在如果我将https
部分更改为http
然后页面重定向到https://domain.com
而不是https://domain.com/test/testing/
我该如何解决它,以便如果您转到旧版本页面http://domain.com/test/testing/
(非https版本),它redir而不仅仅是域名https://domain.com
http://stackoverflow.com/questions/4083221/how-to-redirect-all-http-requests- to-https – 2014-11-03 17:05:52
您是否已将网站和主页URL更改为永久链接中的“https://”? – anubhava 2014-11-03 17:20:13
嗨Anubhava,是的,我已经完成了它...它适用于https://完美,但只要你访问一个旧的链接,然后它重定向到家庭https://版本,而不是https格式的页面... – 2014-11-03 17:25:01