Html相对链接不使用带有弹性beanstalk的https

时间:2017-10-07 22:21:34

标签: php apache .htaccess https elastic-beanstalk

当我的页面加载了https时,我的相对链接仍在尝试通过http加载。当我尝试使用https转到脚本时脚本就在那里并加载但不会在页面上加载。

Mixed Content: The page at 'https://site-qa-cloned.us-east-2.elasticbeanstalk.com/' was loaded over HTTPS, but requested an insecure script 'http://site-qa-cloned.us-east-2.elasticbeanstalk.com/public_html/scripts/lib/stripe.js'. This request has been blocked; the content must be served over HTTPS.

简单的脚本加载。我也尝试了//public_html...,它会尝试在http://public_html/..找到该脚本,但不会更改协议。

<script src="public_html/scripts/lib/stripe.js"></script>

的.htaccess

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . index.php [L]

0 个答案:

没有答案