1
我試圖迫使非HTTPS遊客到HTTPS,請參見下面重定向非HTTPS到HTTPS
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [QSA,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/%$1 [R,L]
它重定向example.com到https://example.com/index.php 我只想example.com我的代碼重定向到https://example.com
請幫忙。
你可以試試這個:'RewriteEngine敘述在 的RewriteCond%{SERVER_PORT} 80 重寫規則^(。*)$的https://%{SERVER_NAME} /%$〔R ,L]' – Hackerman