reactjs - React 路由器在 nginx 中无法正常工作
问题描述
React 路由器在 URL 中使用一个额外的参数,但是当添加另一个参数(如 /panel-admin/dashboard)不起作用时,我添加了这个代码
location / {
try_files $uri /index.html;
}
但不起作用
解决方案
也许试试这个?
location / {
try_files $uri $uri/ /index.html;
}
推荐阅读
- c# - 需要 iText 7 pdhHtml 示例来使用 TableTagWorker 接口创建表
- php - 如何解决我在 php 中的 header 函数的问题
- python - 如何在 Tkinter 中将图像定位到框架中并在每次单击按钮时“清空”它?
- python - python - 如何使用pandas在python中将嵌套的json数组与它们的父级展平
- php - WordPress:自定义用户角色无法访问自定义帖子类型 | “对不起,您无权访问此页面”
- python - 如何从我的输出列表中删除“TextBlob”
- pip - 错误:找不到满足 apache-airflow 要求的版本(来自版本:无)
- android - 带有 ID 选择器的 CSS 未在 android Webview 上加载
- node.js - 编辑 DiscordJS 斜线命令权限
- ruby-on-rails - 有没有办法用 Webpack 清除 FontAwesome?