.htaccess redirect subfolder to HTTPS

前端 未结 7 1766
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 01:41

I\'m trying to write a RewriteRule for my .htaccess file. Specifically, whenever a user accesses a specific subdirectory, I would like it to Rewrite to force an HTTPS connec

相关标签:
7条回答
  • 2020-12-14 02:43

    Add the lines given below to .htaccess file of that subdirectory:

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://www.domain.com/subdirectory/$1 [L,R=301]
    
    0 讨论(0)
提交回复
热议问题