nginx: send all requests to a single html page

前端 未结 6 2066
南笙
南笙 2020-11-30 17:45

Using nginx, I want to preserve the url, but actually load the same page no matter what. I will use the url with History.getState() to route the requests in my

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-30 18:14

    Your original rewrite should almost work. I'm not sure why it would be redirecting, but I think what you really want is just

    rewrite ^ /base.html break;
    

    You should be able to put that in a location or directly in the server.

提交回复
热议问题