使用htaccess Https到http重定向

共識發表於2021-07-13

我正在嘗試將https://www.xxxx.cn/重定向http://www.xxxx.cn/。我在.htaccess檔案中嘗試了以下程式碼

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT]

RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

它一直使我的網站重定向,有什麼建議?

本作品採用《CC 協議》,轉載必須註明作者和本文連結

相關文章