.htaccess文件到nginx配置文件

时间:2012-07-08 18:28:54

标签: file .htaccess configuration nginx

我真的需要将此.htaccess代码转换为nginx配置。我从未使用过nginx,所以我对这种东西很新。 我的.htaccess不是那么大。如果有人可以将它转换为nginx配置文件,那就太棒了!

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

(我曾尝试使用之前发布的转换器,但它们似乎都没有用。) 提前致谢, Zoorah。

1 个答案:

答案 0 :(得分:0)

假设“file.swf”中的“file”表示文件名,那么......

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