有没有办法在htaccess中使用弹性beanstalk的自定义环境属性? 我只想在不在本地运行时将http重写为https,所以我想我可以通过使用elastic beanstalk的环境属性来做到这一点。
RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule !/status https://%{SERVER_NAME}%{REQUEST_URI} [L,R=301]
你可以在下面的链接find类似的问题的解决scheme:
https://stackoverflow.com/questions/21878024/configure-apache-on-elastic-beanstalk