2010-12-13 46 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

相關問題