Iis 7 ImageResizer web.config重写规则工作不正常
我正在使用ImageResizer从我的Amazon S3读取图像,根据这一规则,它工作得非常好:Iis 7 ImageResizer web.config重写规则工作不正常,iis-7,rewrite,imageresizer,Iis 7,Rewrite,Imageresizer,我正在使用ImageResizer从我的Amazon S3读取图像,根据这一规则,它工作得非常好: <rewrite> <rules> <rule name="Rewrite to s3" stopProcessing="true"> <match url="^(.*)/(productimages)/(.*)" /> <action type="Rewrite" url="{R:1}/my
<rewrite>
<rules>
<rule name="Rewrite to s3" stopProcessing="true">
<match url="^(.*)/(productimages)/(.*)" />
<action type="Rewrite" url="{R:1}/mybucketname/{R:3}" appendQueryString="true" redirectType="Found" />
</rule>
</rules>
</rewrite>
从Amazon S3加载此图像:
http://localhost:7514/s3/mybucketname/112/0718877-21_lg.jpg
一切正常,但我需要去掉第一个URL中的/s3
,因此它将是:
http://localhost:7514/productimages/112/0718877-21_lg.jpg
我已经尝试了一百万种不同的组合,但我无法得到它。如果不知道您尝试了什么,就有点难以帮助 你试过这样的东西吗
<rewrite>
<rules>
<rule name="Rewrite to s3" stopProcessing="true">
<match url="^productimages/(.*)" />
<action type="Rewrite" url="s3/mybucketname/{R:1}" appendQueryString="true" redirectType="Found" />
</rule>
</rules>
</rewrite>
<rewrite>
<rules>
<rule name="Rewrite to s3" stopProcessing="true">
<match url="^productimages/(.*)" />
<action type="Rewrite" url="s3/mybucketname/{R:1}" appendQueryString="true" redirectType="Found" />
</rule>
</rules>
</rewrite>