【发布时间】:2015-01-13 08:36:36
【问题描述】:
我的网站上有 SSL,想将我的所有 http 页面重定向到 https 我在下面找到了一些东西并为 www.yourdomain.com 工作。
如果我还需要将所有 yourdomain.com(不带 www)转移到 https,我应该在 htaccess 中添加什么?谢谢!
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]
<!-- Please put the redirect without www here, thanks-->
【问题讨论】:
标签: apache .htaccess redirect https