前端引用css,js时如果写的…/…/之类的引用方式,那么在访问链接中加入多个斜杠会导致引用失败.
可以通过nginx对多个斜杠进行处理
如访问 public//view//a//test.html 重定向到 public/view/a/test.html
merge_slashes off;
rewrite (.*)//(.*) $1/$2 permanent;
前端引用css,js时如果写的…/…/之类的引用方式,那么在访问链接中加入多个斜杠会导致引用失败.
可以通过nginx对多个斜杠进行处理
如访问 public//view//a//test.html 重定向到 public/view/a/test.html
merge_slashes off;
rewrite (.*)//(.*) $1/$2 permanent;