CssRewriteUrlTransform
全部标签 我们在我们的站点中使用MVC捆绑,CssRewriteUrlTransform确保图像url从动态捆绑css文件中工作。但这仅在不使用虚拟目录时有效,即http://localhost/VirttualDir不起作用,但http://localhost/可以。这是因为CssRewriteUrlTransform转换在重写url时没有考虑虚拟文件夹。因此,如果图像的真实路径是localhost/vdir/content/img/foo.png,它会将其重写为localhost/content/img/foo.png,这是错误的 最佳答案
我们在我们的站点中使用MVC捆绑,CssRewriteUrlTransform确保图像url从动态捆绑css文件中工作。但这仅在不使用虚拟目录时有效,即http://localhost/VirttualDir不起作用,但http://localhost/可以。这是因为CssRewriteUrlTransform转换在重写url时没有考虑虚拟文件夹。因此,如果图像的真实路径是localhost/vdir/content/img/foo.png,它会将其重写为localhost/content/img/foo.png,这是错误的 最佳答案