首页 > 解决方案 > Nginx 重写规则仅适用于第一个请求

问题描述

我有一个需要 nginx 重写规则的要求,这样当我启动 URL - http://localhost:8554/web-app 时,路径应该更改为 http://localhost:8554/web-app /login.jsp

但是,此重定向仅在我键入 http://localhost:8554/web-app/ 或 http://localhost:8554/web-app 时才会发生,而不是在登录后的后续请求中发生。该 url 包含登录后的 /web-app uri,因此用户登录后不应发生重定向。

任何帮助表示赞赏。

标签: nginxurl-rewriting

解决方案


推荐阅读