为什么nginx重写从/login/ /login发布请求?
有一个if语句,当客户端是Android的时候会重写url。 一切还好。 但是,有些奇怪的东西。 即使if语句的块是bank,Nginx也会将post请求/login写入//login。 所以我有一个404页面。 由于docker服务器只接受/login请求。 服务器conf: location / { proxy_pass http://localhost:8785/; proxy_set_header Host $http_host; proxy_set_header Remote-Addr $http_remote_addr; proxy_set_header X-Real-IP $remote_addr; if ( $http_user_agent ~ Android ){ # rewrite something, been commented } } debugging信息,原始日志https://gist.github.com/3799021 … 2012/09/28 16:29:49 [debug] 26416#0: *1 http script regex: "Android" 2012/09/28 16:29:49 [notice] 26416#0: *1 "Android" matches "Android/1.0", client: 106.187.97.22, […]