【问题标题】:.htaccess file to nginx configuration file.htaccess 文件到 nginx 配置文件
【发布时间】:2012-07-08 18:28:54
【问题描述】:

我真的需要将此 .htaccess 代码转换为 nginx 配置。我从来没有使用过 nginx,所以我对这种东西很陌生。 我的 .htaccess 没有那么大。如果有人能把它转换成 nginx 配置文件,那就太好了!

<Files file.swf>
   ForceType application/x-httpd-php
</Files>

(我曾尝试使用之前发布的转换器,但它们似乎都不起作用。) 提前致谢, 祖拉。

【问题讨论】:

    标签: file .htaccess configuration nginx


    【解决方案1】:

    假设“file.swf”中的“file”代表一个文件名,那么……

    location ~ file\.swf {
        default_type application/x-httpd-php;
    }
    

    【讨论】:

    • 它并没有真正起作用。我现在在尝试访问文件时收到 404 Not Found 错误。
    猜你喜欢
    • 2015-01-14
    • 2016-07-15
    • 1970-01-01
    • 1970-01-01
    • 2022-06-22
    • 2013-03-13
    • 2015-04-15
    • 2016-05-20
    • 1970-01-01
    相关资源
    最近更新 更多