NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
lisonfan
V2EX  ›  NGINX

请教一个 NGINX 重定向的问题

  •  
  •   lisonfan · Oct 12, 2019 · 2310 views
    This topic created in 2409 days ago, the information mentioned may be changed or developed.

    vue 项目

    访问 https://example.com/abc?def=123 被 301 到了 https://example.com:8443/abc/?def=123

    因为 nginx 在非 root 下运行,所以 nginx 配置监听的端口是 8443,然后通过 firewalld 转发 443 到 8443

    该如何配置才能正确重定向?( https://example.com/abc?def=123 -> https://example.com/abc/?def=123)

    1 replies    2019-10-14 16:16:15 +08:00
    vloony
        1
    vloony  
       Oct 14, 2019
    301 时候自己手写主机名+$uri 就行了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3098 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 03:00 · PVG 11:00 · LAX 20:00 · JFK 23:00
    ♥ Do have faith in what you're doing.