Correctly switching between HTTP and HTTPS using .htaccess

后端 未结 6 1783
挽巷
挽巷 2020-11-28 08:14

We\'ve got a shopping site which we\'re hosting on a shared host (Mediatemple Gridserver). Some parts of the site need to use HTTPS (checkout etc) but the rest should be usi

6条回答
  •  粉色の甜心
    2020-11-28 08:40

    I think it should be:

    RewriteCond %{HTTPS}  =on
    ^/checkout(.*) http://shoppingsite.com/checkout$1 [R]
    

    See the mod_rewrite documentation.

提交回复
热议问题