页面,而不是显示HTML的纯文本 [英] pages are displaying plain text instead of html

查看:270
本文介绍了页面,而不是显示HTML的纯文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我托管在同一台服务器上的多个站点,并使用HTTP的虚拟主机文件来指定为他们的虚拟主机信息。这是伟大的工作。问题是我在Movable Type的改变中创建条目的方式。我希望他们没有文件扩展名。因此它是目前domain.com/entry/15~~V代替domain.com/entry/15.html。因为我拿出的.html我假设Apache不知道这样做是随地吐痰的页面作为纯文本内容。我该如何解决这个问题?我在一个虚拟主机块又说:

I am hosting multiple sites on the same server and using a http-vhosts file to specify virtual host info for them. It is working great. The problem is I changed in Movable Type the way entries are created. I want them to not have file extension. So it is currently domain.com/entry/15 instead of domain.com/entry/15.html. Because I took out the .html I'm assuming apache doesn't know what to do so it is spitting out the page as plain text. How can I fix this? I added in a virtualhost block:

DefaultType text/html

我还补充说,在httpd.conf希望它会在全球范围修复它为我所有的网站。我重新启动Apache和仍然相同的问题。任何想法?

I also added that in the httpd.conf hoping it would fix it globally for all my sites. I restarted apache and still the same problem. Any ideas?

推荐答案

是否有可能,这是一个内容协商问题?在我见过的Apache少数情况下尝试确定正在寻找提供服务的文件的前几个字节请求文件的排序。

Is it possible that this is a content negotiation problem? In a few cases I've seen Apache try to determine what sort of file is being requested by looking at the first few bytes of the file being served.

我已经看到了问题,在http.conf中注释掉mod_negotiation模块并重新启动来解决。请参阅 mod_negotiation模块文档了解更多详情。

I have seen problems like this be solved by commenting out mod_negotiation in http.conf and restarting. See the mod_negotiation documentation for more details.

这篇关于页面,而不是显示HTML的纯文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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