V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
liuyinltemp
V2EX  ›  NGINX

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

  •  
  •   liuyinltemp · 2019-05-17 15:05:22 +08:00 · 2428 次点击
    这是一个创建于 1777 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如题,希望客户输入 https://aaa.com 后 自动跳转 https://aaa.com/bbs/index.php ,默认引导客户去论坛,这个怎么写呀,只要引导一次就可以了。谢谢!
    3 条回复    2019-05-17 15:48:06 +08:00
    jpacg
        1
    jpacg  
       2019-05-17 15:17:24 +08:00
    location / {
    alias bbs/;
    sheeta
        2
    sheeta  
       2019-05-17 15:20:24 +08:00
    location / {
    return 302 https://$host/bbs/index.php;
    }
    zong400
        3
    zong400  
       2019-05-17 15:48:06 +08:00
    首页弹个框引导,nginx 配置不能实现“只要引导一次”
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5299 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 09:23 · PVG 17:23 · LAX 02:23 · JFK 05:23
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.