Nginx 请教一个 Nginx 配置问题

dorayatou · September 19, 2015 · Last by yzou replied at September 20, 2015 · 6547 hits

情景: 有一个对前端资源的请求,比如http://localhost/mulu/abc.min.js 想真正请求的文件为 http://localhost/mulu/abc.js. 如何去掉路径中的.min?

location = /mulu/abc.min.js {
    rewrite / /mulu/abc.js last;
}
You need to Sign in before reply, if you don't have an account, please Sign up first.