【发布时间】:2017-01-15 22:47:00
【问题描述】:
我正在寻找适用于使用非 www 和 https (SLL) 以及 Wordpress 的域的 .htaccess 配置**
在堆栈溢出和数百种组合上花费了数小时后,我还没有找到一个可以满足我所有需要的 htaccess 文件。
此 htaccess 文件必须执行以下操作:
- 将 www 改写为非 www
- 将 http 重写为 https
- 保留 URI 字符串(您网站上的 url 部分)
- 启用 wordpress 以处理漂亮的永久链接。
- http://www.示例 .com --> https:// 示例 .com
- https://www. example.com --> https://example.com
- http://example.com --> https://example.com
- https://example.com --> https://example.com(必须忽略)
- http://www.例如.com/foo.html --> https://example.com/foo.html
- https://www.例如.com/foo.html --> https://example.com/foo.html
- http://example.com/foo.html --> https://example.com/foo.html
- https://example.com/foo.html --> https://example.com/foo.html (必须忽略)
【问题讨论】:
-
如果您想发布信息,请写一个问题,并选中表格底部的
Answer your own question框。
标签: .htaccess redirect https uri