Apache2的服务器MIME类型 [英] Apache2 server mime types

查看:136
本文介绍了Apache2的服务器MIME类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让我的Apache2 web应用程序推任意文件扩展名时,通过浏览器指向一个八位字节流。

I am trying to get my Apache2 web application to push an arbitrary file extension as an octet-stream when pointed to by a browser.

即。有人去blahblah /例子/ example1.xyz我希望浏览器下载文件名为.xyz,而不是仅仅显示它。

i.e. Someone goes to blahblah/examples/example1.xyz I want the browser to download the .xyz file rather than just display it.

我在

AddType application/octet-stream xyz

和我也尝试到MIME类型添加到 /etc/apache2/mods-enabled/mime.conf 的/ etc / MIME .types 这是作为类型库引用从 mime.conf

And I have also tried to add the mime type to /etc/apache2/mods-enabled/mime.conf and /etc/mime.types which is referenced as the types library from mime.conf.

我看了这个在互联网上的一个很好的协议,仍然没有得到这方面的工作。任何帮助将大大AP preciated!谢谢你。

I have read a good deal about this on the internet and still haven't gotten this working. Any help would be greatly appreciated! Thanks.

推荐答案

我相信你需要添加一个 延期前:

I believe you have to add a . before the extension:

将AddType应用程序/八位字节流名为.xyz

这篇关于Apache2的服务器MIME类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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