【发布时间】:2018-02-20 16:27:52
【问题描述】:
这是我网站 htaccess 文件中用于 https 的 php 重写代码
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
这是我的问题
我的网站重定向 http://www.example.org --301--> https://www.example.org --301--> https://example.org
由于第一个 (http://www.example.org) 有 400 多个反向链接,最好直接重定向到 https://example.org 并避免中间步骤。
谁能告诉我正确的重写代码?
【问题讨论】:
标签: .htaccess mod-rewrite