我正在寻找适合我的情况的最佳实践。我想为不同的图像大小或预设设置不同的文件夹:
/productimages/small/product1.jpg
/productimages/small/product2.jpg
/productimages/large/product1.jpg
/productimages/large/product2.jpg或
/productimages/product1.jpg/small
/productimages/product2.jpg/small
/productimages/product1.jpg/large
/productimages/product2.jpg/large我应该使用哪种Url格式?我是否应该使用具有不同虚拟路径的多个VirtualFolder插件,这些插件指向相同的物理路径并使用重写功能?有没有更好的方法来做这件事?
<add name="VirtualFolder" virtualPath="~/productimages/small", physicalPath="D:\images" />
<add name="VirtualFolder" virtualPath="~/productimages/large", physicalPath="D:\images" />提前谢谢。
发布于 2015-03-18 05:29:19
我建议使用URL重写-任何类型的工作。VirtualFolder在这里没有贡献--重写会做你需要的一切。
https://stackoverflow.com/questions/29105915
复制相似问题