php - 下载页面而不是通过 SSL 呈现

标签 php apache ssl bluehost

我使用 Bluehost 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

这是正确加载时 header 的示例:

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

最佳答案

我发现问题是由我的 css 和 javascript 缩小脚本“CSS 和 Javascript Combinator”引起的。当我将它换成使用“Minify”时,问题就解决了。

关于php - 下载页面而不是通过 SSL 呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4424876/

相关文章:

php - sql中的MAX()函数仅返回数字的第一个字符

php - Oracle Blob 作为 PHP 页面中的 img src

php - 使用 TinyMCE 的谷歌文档样式自动保存

apache - 将 UCM 与另一台机器上的 Apache 服务器连接

ssl - 中间 CA 的证书链问题

apache - 将非 www https 重定向到 apache 上的 www https 未按预期工作

c++ - boost::asio 通过 http 代理握手?

php - 如何检查查询的数据是否不包含任何记录

javascript - 对 .html 文件的 Ajax 调用删除了 HTML 注释

apache - htaccess 将缺少的bundle.*.js 版本重定向到bundle.js 文件