BrowserRouter模式的路由.一般地址带参数:正常静态文件的地址:www.xxx.com/static/css/common.css
当访问www.xxx.com/game/22的时候 静态文件地址:www.xxx.com/game/static/css/common.css 导致报错了.它把game这个路由名称也带进来了..请问nginx配置 怎么处理静态文件的 地址规则?
以下是我的nginx代理方式:
项目访问地址: https://lurenhong.top/blog/#/home
如果想在根域名下直接访问项目 location / 配置/就行 root或者alias 指向项目目录
root
alias
location /blog { root html; index index.html index.htm; }
2.1m questions
2.1m answers
60 comments
56.6k users