location ^/html/ {
root html;
index index.html index.htm;
}
location ^~ /just_a_test/ {
content_by_lua_file test1.lua;
}
location ^~ /restricted_main/ {
rewrite ^/restricted_main/(.*) /just_a_test/$1 break;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:80;
}
分别请求如下 uri :
/html -> 301 跳转到 /html/
/just_a_test -> 404
/restricted_main -> 301 跳转到 /restricted_main
请教一下,^~ 的 location,请求时不带最后的 / 会被自动跳转到带 / 的,是哪个模块实现的呢?
location 中 使用 content_by_lua 而造成 自动跳转失效的问题,是bug么。。。