0
我想強制非https只在網站上的一個文件夾,但其餘所有應該是https。這裏是我的.htaccess代碼:強制http到一個填充靜止力https
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule^https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteRule ^reports$ http://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9a-zA-Z].+)$ /page.php?title=$1 [L]
ErrorDocument 404 404.php
一切正常,但當我打開報告其重定向到非HTTPS是好的,但它並沒有打開頁面其說:頁面不正確重定向 –
請檢查螢火蟲或鉻開發工具(或任何你是使用)哪些重定向正在發生。也許在http強制執行後會有另一個重定向運行。 – Seb
我有螢火蟲,但如何檢查使用firbug重定向錯誤?我不知道如何。對不起 –