Force HTTPS on certain URLs and force HTTP for all others

后端 未结 4 1662
孤独总比滥情好
孤独总比滥情好 2020-12-03 03:15

I have a client project where I need to force HTTPS for a certain folder and force HTTP for all others. I can sucessfully enforce HTTPS for the folder I desire but then all

4条回答
  •  余生分开走
    2020-12-03 04:10

    Just invert the conditions:

    RewriteCond %{HTTPS} =on
    RewriteRule !^my http://%{HTTP_HOST}%{REQUEST_URI} [NC,R=301,L]
    

提交回复
热议问题