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

nginx 自动跳转到二级目录怎么写,用 rewrite?

  •  
  •   alpinefly · May 17, 2019 · 3578 views
    This topic created in 2733 days ago, the information mentioned may be changed or developed.
    如题,希望客户输入 https://aaa.com 后 自动跳转 https://aaa.com/bbs/index.php ,默认引导客户去论坛,这个怎么写呀,只要引导一次就可以了。谢谢!
    3 replies  •  2019-05-17 15:48:06 +08:00
    jpacg
    jpacg
    May 17, 2019
    1
    location / {
    alias bbs/;
    sheeta
    sheeta
    May 17, 2019
    2
    location / {
    return 302 https://$host/bbs/index.php;
    }
    ethsol
    ethsol
    May 17, 2019
    3
    首页弹个框引导,nginx 配置不能实现“只要引导一次”
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   948 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:05 · PVG 04:05 · LAX 12:05 · JFK 15:05
    ♥ Do have faith in what you're doing.