【求助】nginx 莫名起名的301重定向,请大佬帮我?

我的配置如下:

server {
    listen 90;
    server_name localhost; 
    location /h6 {
        rewrite "^/h6/(.*)$" /$1 break;         
        root  /www/h6;          
        try_files $uri $uri/ /h6/index.html;    
    }        
}

当我访问http://localhost:90/h6/home总会301跳转到http://localhost:90/home,
当我访问非home后缀时,例如http://localhost:90/h6/user则正常显示内容,有没有懂得大佬帮一下我,我实在不明白为什么会这样?

阅读 2.5k
1 个回答
rewrite "^/h6/(.*)$" /h6/$1 break;
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题