【问题标题】:How to make htaccess set file type on a particular file?如何在特定文件上设置 htaccess 文件类型?
【发布时间】:2010-04-05 08:28:54
【问题描述】:

所以我需要做的是让一个 html 文件(没有 html 扩展名)被视为一个 html 文件。

我有这行:

AddType application/msword mypage

但显然 .htaccess 中的最后一个参数只支持扩展。有没有办法让那个东西在特定文件上工作?

【问题讨论】:

    标签: apache .htaccess


    【解决方案1】:
    <Files nosuffix>
    DefaultType text/html
    </Files>
    

    参考:DefaultTypeFiles

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-19
      • 1970-01-01
      • 2014-05-15
      • 2013-01-20
      • 2014-11-05
      相关资源
      最近更新 更多