【发布时间】:2018-06-16 03:59:28
【问题描述】:
我已将以下内容写入我的 .htaccess 文件中,该文件位于我的 index.html 所在的目录中。
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.*)$ [NC]
RewriteRule (.*) https://%1%{REQUEST_URL} [L,R=301]
I want that
www.example.com
http://example.com
and http://www.example.com
are redirected to
https://example.com
我必须与 example.com 交换 REQUEST_URI 还是我做错了什么?
【问题讨论】:
标签: apache .htaccess redirect web https