开发者

Page is downloaded instead of rendered over SSL

I have my checkout page secured on my site with the Bluehost SSL certificate and quite frequently the page will be downloaded instead of rendered.

This only happens when I use ssl, if I run the site without it the page loads fine.

Is there anything i can do to prevent this, I have tried placing

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

at the top of the page but this doesn't solve the issue. Here is an example of the file headers that are downloaded when the issue occurs:

     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

Here is an example of the headers when it loads correctly:

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: 开发者_如何学Ctext/html


I found the issue was being caused by my css and javascript minifier script, "CSS and Javascript Combinator". When I swapped it out to use "Minify" the issue was resolved.


Does the header header("Content-disposition: inline"); help?


You need to tell apache its OK to use SSL with php files.

Have you got the correct stanza in the extra/httpd-ssl.conf

It should look something like:-

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜