2010-12-13 49 views
2

我有我的结帐页面与Bluehost SSL证书绑定在我的网站上,并且相当频繁地下载页面而不是渲染。页面被下载而不是通过SSL呈现

这只发生在我使用ssl的时候,如果我运行没有它的网站,页面加载正常。

有什么我可以做,以防止这一点,我试图把

<?php header("Content-type: text/html"); ?> 

在页面的顶部,但这并不解决问题。这里是正在下载的文件头的一个例子,当问题发生时:

 HTTP/1.1 200 OK 
Date: Sun, 12 Dec 2010 23:42:18 GMT 
Server: Apache 
X-Powered-By: PHP/5.2.14 
Expires: Thu, 19 Nov 1981 08:52:00 GMT 
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 
Pragma: no-cache 
Content-Encoding: gzip 
Vary: Accept-Encoding 
Connection: close 
Transfer-Encoding: chunked 
Content-Type: text/html 

这里是头的一个例子,当它加载正确:

HTTP/1.1 200 OK 
Date: Mon, 13 Dec 2010 03:04:08 GMT 
Server: Apache 
X-Powered-By: PHP/5.2.14 
Expires: Thu, 19 Nov 1981 08:52:00 GMT 
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 
Pragma: no-cache 
Content-Encoding: gzip 
Vary: Accept-Encoding 
Keep-Alive: timeout=10, max=28 
Connection: Keep-Alive 
Transfer-Encoding: chunked 
Content-Type: text/html 
+1

问题*没有发生时的标题是什么? – TheDeadMedic 2010-12-13 00:11:01

+0

我从此尝试使用Charles Web Debugging Proxy来调试该网站,并发现当Charles使用它自己的证书时没有问题。有可能这个问题可能是由bluehost使用的实际证书? – Rod 2010-12-13 03:50:09

+0

我认为问题可能归结于Connection:close,它应该是Connection:Keep-Alive - 这完全是基于您发布的成功和失败响应头的区别。 – TheDeadMedic 2010-12-13 19:09:52

回答

1

我发现这个问题正由我的CSS和JavaScript minifier造成脚本,“CSS和Javascript组合器”。当我将它换出来使用“Minify”时,问题就解决了。

0

请问标题标题(“内容 - 处置:内联“);帮帮我?

+0

不,当问题发生时“响应标题中列出了”内容处置:内联“ – Rod 2010-12-13 03:21:05

0

你需要告诉Apache它的确定使用SSL与PHP文件。

有你的额外/的httpd-ssl.conf中得到了正确的节

它应该是这个样子: -

<FilesMatch "\.(cgi|shtml|phtml|php)$"> 
    SSLOptions +StdEnvVars 
</FilesMatch> 
+0

问题只是间歇性地发生......但我尝试了您的建议,但似乎没有帮助。 – Rod 2010-12-13 06:46:10

相关问题