嗨,我的 htaccess 可以正常工作,但是当我转到 https 时,它会阻止我的脚本和 css。这是错误的示例
[blocked] The page at https://bctech.com/checkout.php?session=41fb31bc29722f2e520877d612e0ea4b ran insecure content from http://bctech.com/scripts/superfish.js.
我真的很迷茫,因为我是 htacces 的新手
这是我正在使用的 css url 的示例
<script type="text/javascript" src="/scripts/jquery-1.10.2.js">
最后这是我对 htaccess 文件的尝试,正如我所说的那样,它可以工作,但会阻止我所有的 css 和 jscript 文件,我哪里出错了,我必须关闭
.htacces 代码
<ifModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(checkout\.php|final\.php|admin/(.*))$ https://{HTTP_HOST}/$1[R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !/(checkout\.php|final\.php|admin/(.*))$
RewriteCond %{REQUEST_URI} !\.(css|js)$ [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# For Sales:
RewriteRule ^shop/sales/?$ sales.php
# For the primary categories:
RewriteRule ^shop/([A-Z-Aa-z\+]+)/?$ shop.php?type=$1
# For specific products:
RewriteRule ^browse/([A-Za-z\+]+)/([A-Za-z\+\-]+)/([0-9]+)$ browse.php?type=$1&category=$2&id=$3
#For https pages:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC]
RewriteRule ^ /%1 [R=301,L]
</ifModule>