# nginx vue 处理前台路由 history 模式刷新 404 的问题 location / { try_files $uri $uri/ /index.html; if ($uri ~* .*\.(?:htm|html)$) { add_header Cache-Control "no-store, no-cache"; add_header Pragma "no-cache"; } if ($uri ~* .*\.(?:js|css|jpg|jpeg|gif|png|ico|cur|gz|ttf|woff|ico|svg|svgz|mp4|ogg|ogv|webm)$) { expires 7d; access_log off; add_header Cache-Control "public"; } index index.html index.htm; }
转自:http://Www.CnBlogs.Com/WebEnh/
如果想下次快速找到我,记得点下面的关注哦!
本博客Android APP 下载 |
支持我们就给我们点打赏 |
支付宝打赏 支付宝扫一扫二维码 |
微信打赏 微信扫一扫二维码 |
如果想下次快速找到我,记得点下面的关注哦!