Force https except for one directory

前端 未结 1 573
再見小時候
再見小時候 2021-01-16 21:51

I\'m using the following .htaccess file to force any page request to https://

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{         


        
1条回答
  •  不思量自难忘°
    2021-01-16 22:53

    This should get what you need.

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !domain [NC]
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    

    0 讨论(0)
提交回复
热议问题