http{
server {
listen 80;
server_name example.com;
rewrite_log on;
root /etc/nginx/html/mysite;
location ^~ /me/ {
rewrite ^/me/(.*)$ /etc/nginx/html/mysite/$1.html;
}
}
}
以上,当我提出请求http://example.com/me/all
nginx.conf的rewrite没有得到触发
我希望它通过/etc/nginx/html/mysite/all.html
放送,但要求去/etc/nginx/html/mysite/me/all
忽略重写不工作,没有任何关于日志中的重写错误(只是404未找到)。