相关疑难解决方法(0)

CssRewriteUrlTransform有或没有虚拟目录

我们在我们的站点中使用MVC Bundling,CssRewriteUrlTransform确保图像URL在动态bundle css文件中工作.

但这只适用于不使用虚拟目录的情况,即

http://localhost/VirttualDir不行,但http://localhost/确实如此.这是因为CssRewriteUrlTransform在重写URL时,转换不会考虑虚拟文件夹.因此,如果图像真实路径是localhost/vdir/content/img/foo.png它将重写它localhost/content/img/foo.png是错误的

c# web-optimization asp.net-mvc-4 bundling-and-minification

61
推荐指数
3
解决办法
2万
查看次数