为什么图像和CSS不会在HTTPS下显示? [英] Why images and CSS do not show under HTTPS?

查看:123
本文介绍了为什么图像和CSS不会在HTTPS下显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在我的网站上添加了SSL。当我去 https://mydomain.com 时,我看到了文字,但没有CSS或图片。它位于专用服务器上,我可以完全控制代码。



目前所有路径都是相对的。无论是使用HTTP还是HTTPS,当我直接访问这些文件时,我都可以查看图像和CSS。但是,当我加载页面时,他们没有加载...



当我使用Firebug并查看NET时,我看到每个图像302找到。这是什么意思?



我需要做些哪些更改才能确保http和https显示网站类似?



<请问所有路径都是绝对的吗?有没有办法让一个改变影响所有人,或者我实际上必须改变每一个?



谢谢。

解决方案

你有热链接保护吗?如果您尝试禁用它。看看它是否有帮助。


I just added an SSL to my site. When I go to https://mydomain.com I see the text but no CSS or images are there. It is on a dedicated server and I have a full control of the code.

All paths currently are relative. I can view images and css when I go to those files directly whether using HTTP or HTTPS. But when i load a page they are not loading...

When I use Firebug and look in NET, I see for each image 302 Found. What does that mean?

What changes do I need to make to make sure http and https display site similarly?

Do I make all paths absolute? Is there a way to make a single change to affect all or I actually have to go and change each and every one?

Thanks.

解决方案

Do you have hotlink protection? If you have try to disable it. And see if it helps.

这篇关于为什么图像和CSS不会在HTTPS下显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆