欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

nginx中配置react-router参数跳转

发布时间:2025/3/20 编程问答 27 豆豆
生活随笔 收集整理的这篇文章主要介绍了 nginx中配置react-router参数跳转 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

2019独角兽企业重金招聘Python工程师标准>>>

location / {root /home/iwork;index index.html;try_files $uri /index.html; #这句关键哦 }#子路径刷新 location ^~ /main {try_files $uri /index.html; }#代理 location ^~ /iwork/ {proxy_pass http://192.168.0.193:8080/iwork/;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }

nginx 只匹配 / ,剩下的应该由react-router来做

转载于:https://my.oschina.net/xuqiang/blog/690705

总结

以上是生活随笔为你收集整理的nginx中配置react-router参数跳转的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。