[英]Symfony3 ( or htaccess) enforce HTTPS on specific base url only
Is there a way that I can implement it so that the https scheme is enforced for base url A but not for base url B, other than maintaining two separate security.yml files? 除了维护两个单独的security.yml文件之外,有没有一种方法可以实现,以便对基本URL A强制实施https方案,而不对基本URL B强制实施https方案?
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} ^prod.yourdomain.com$ [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Now only prod.yourdomain.com will be redirected to https. 现在,只有prod.yourdomain.com将被重定向到https。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.