2 つの単純な html ページのリダイレクトに問題があります。
次のリダイレクトを設定する必要があります。
- http: //example.com/Folder1/page1.html からhttps://example.com/Folder1/page1.html
- http: //example.com/Folder1/Folder2/page2.html https://example.com/Folder1/Folder2/page2.html
これら 2 つのページのみを http から https にリダイレクトする必要があります。その他のページは、http と https の両方で使用できる必要があります。
私はこれらのルールで試しました:
RewriteCond %{SERVER_PORT} !=443
rewriterule ^(Folder1)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 1=443
RewriteCond $1 ^Folder1/Folder2
rewriterule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
ただし、2 番目のリダイレクトのみが機能します。最初はまだ http ページを開きます。
誰かが正しいルールを書くのを手伝ってくれませんか?