2

我正在开发一个网站,我发现 Internet Explorer 会尝试保存登录页面而不是打开它(其他浏览器工作正常)。这是链接:

xanderadvertising.mcas.ro

我正在尝试通过操作 .htaccess 和 HTTP 标头来提高站点性能,但我认为某处存在冲突。

其他页面运行良好:

xanderadvertising.mcas.ro/en

任何想法为什么 IE 会这样?

谢谢你。

4

2 回答 2

1

您正在访问的页面可能有一个Content-Type标题,IE表明它不是网页。所以它试图将它保存在某个地方,因为它不知道如何渲染。

这是使用curl时的输出:

$ curl -v http://xanderadvertising.mcas.ro/

* About to connect() to xanderadvertising.mcas.ro port 80 (#0)
*   Trying 81.196.37.244... connected
* Connected to xanderadvertising.mcas.ro (81.196.37.244) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
> Host: xanderadvertising.mcas.ro
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Sat, 28 Jan 2012 11:35:26 GMT
< Server: Apache
< X-Powered-By: PHP/5.2.16
< Pragma: no-cache
< ETag: "bcb2565425a8e41ac55b3b085fd8821c"
< Cache-Control: public
< Expires: Sun, 29 Jan 2012 11:31:43 GMT
< Set-Cookie: PHPSESSID=89c110f3588929262dda820fb3d05052; expires=Sat, 11-Feb-2012 11:35:27 GMT; path=/; domain=xanderadvertising.mcas.ro
< Last-Modified: Sat, 28 Jan 2012 11:31:43 GMT
< Content-Length: 23822
< Content-Type: charset=utf-8

如果您查看最后一行,它会说:Content-Type: charset=utf-8. 尝试将内容类型标头设置为Content-Type: text/html; charset=UTF-8.

于 2012-01-28T11:33:21.510 回答
0

Content-Type该页面的响应标头中尤其没有:

Cache-Control:public
Connection:Keep-Alive
Date:Sat, 28 Jan 2012 11:32:06 GMT
ETag:"bcb2565425a8e41ac55b3b085fd8821c"
Expires:Sun, 29 Jan 2012 11:31:43 GMT
Keep-Alive:timeout=5, max=100
Server:Apache

您需要添加Content-Type: text/html. 将其发送Content-Length到浏览器也很好。

也许您可以向我们展示您的 .htaccess 配置?

于 2012-01-28T11:38:20.197 回答