简体   繁体   English

如何将具有MIME类型的文件扩展名与Cheyenne关联?

[英]How to associate file extensions with MIME type with Cheyenne?

I'm trying to use Cheyenne to serve a news feed and would like to ensure that files with the .feed extension are served as application/atom+xml . 我正在尝试使用Cheyenne来提供新闻提要,并希望确保将具有.feed扩展名的文件用作application/atom+xml How do I configure Cheyenne to do this? 如何配置夏安做到这一点?

Got it! 得到它了! In httpd.cfg in either the globals , default or host section ( see docs ), add this directive: 在httpd.cfg的globalsdefaulthost部分( 请参阅docs )中,添加以下指令:

set-mime application/atom+xml .feed

or 要么

set-mime application/atom+xml [.feed .atom]

您是否可以将扩展名改为.rsp,然后以这种方式生成相应的标头,并将提要数据作为rsp脚本中的数据块?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何用域名和配置文件修复Rebol Cheyenne 404? - How to fix Rebol Cheyenne 404 with domain name and configuration file? 如何在 Node.js 中发送文件之前设置 MIME 类型? - How do I set a MIME type before sending a file in Node.js? Web服务器如何知道为资源设置哪种MIME类型? - How does web-server know which mime-type to set for resource? htaccess文件导致添加的MIME类型错误 - htaccess file causing an error with added MIME types 基于Rebol的Cheyenne服务器是否可以处理HTTP REST请求? - Is Rebol-based Cheyenne server able to process HTTP REST requests? IIS 7.5:如何让他默认提供所有文件扩展名(无需手动添加)? - IIS 7.5: How to let him serve by default all file extensions (without manually adding them)? 我的php代码中没有支持格式和mime类型的视频 - No video with supported format and mime type in my php code 资源被解释为脚本,但在单个站点上以MIME类型text / html传输 - Resource interpreted as Script but transferred with MIME type text/html on individual site nginx 无法识别 css 和图像:资源被解释为样式表,但使用 MIME 类型 text/html 传输 - css and images not recognized by nginx: Resource interpreted as Stylesheet but transferred with MIME type text/html 确定文件类型c - determine file type c
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM