我想重定向以下旧URL:
https://domain1.xyz.com/content/images/1ca9551bc00357f63c608b5d90ca7c4652187487.png
到新的URL:
https://domain2.xyz.com/originalfiles/1ca9551bc00357f63c608b5d90ca7c4652187487.png
我的web.config文件具有以下配置,但我无法使其工作:
<rewrite>
<rules>
<rule name="Rewrite Images to CDN" stopProcessing="true">
<match url="(.*)" />
<action type="Redirect" url="https://domain2.xyz.com/originalfiles/{C:1}" appendQueryString="true" redirectType="Permanent" />
<conditions>
<add input="{HTTP_HOST}" pattern="domain1.xyz.com" />
<add input="{URL}" pattern="content/images/(/*.*)" />
</conditions>
</rule>
</rules>
</rewrite>
以上配置重定向到此URL,但此URL不正确:
https://domain2.xyz.com/originalfiles/content/images/1ca9551bc00357f63c608b5d90ca7c4652187487.png
1条答案
按热度按时间nkoocmlb1#
请尝试以下规则: