本地主机是不是在Firefox打开,但在IE8工作正常 [英] localhost is not opening in firefox but working fine in IE8

查看:137
本文介绍了本地主机是不是在Firefox打开,但在IE8工作正常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个的Apache Web应用程序的工作。我完成了这一点,并在IE8其做工精细的项目。现在,我想这同样在Firefox,Opera和铬它导致源$ C ​​$ C。

i am working in a apache web application. i completed a project with this and its working fine in IE8. Now i tried this same in firefox ,opera and chrome it results the source code.

当我输入的http://本地主机/ ,它的结果,

<html>
<head>
<title>X2A.biz</title>
<script type="text/javascript">
window.location.href = "../pages/X2AFrame.htm"
</script>
</head>
<body>
</body>
</html>

我试着用HTML文档的过渡类型也。在X2AFrame.htm,我有框架。

i tried with html transitional doc type also. In X2AFrame.htm, i have frameset.

可以在这个任何一个帮助吗?请...

can any one help in this? pls...

推荐答案

那是因为你没有正确地配置你的Web服务器 - 它服务于这个页面的MIME类型文本/纯,而不是的text / html 。 IE浏览器的内容嗅探和检测,你给它一个HTML页面,其他浏览器不(对符合标准的方法)。所以,你需要修复您的Web服务器的配置,在Apache中您可以使用的 AddType指令

That's because you didn't configure your web server correctly - it serves this page with MIME type text/plain instead of text/html. IE does content sniffing and detects that you gave it an HTML page, other browsers don't (the standard-compliant approach). So you need to fix the configuration of your web server, in Apache you can use the AddType directive:

AddType text/html .htm

这篇关于本地主机是不是在Firefox打开,但在IE8工作正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆