Nginx: Rewrite file extension
How ca开发者_运维知识库n i rewrite a .swf file extension?? This is my syntax which does not work:
rewrite ^/directory/swift$ directory/tools/swift_file.swf last;
You missed leading /
in replacement.
Also, for single file instead of rewriting you can use alias
:
location = /directory/swift {
alias /directory/tools/swift_file.swf;
}
精彩评论