Pdf到Pdf重定向规则在web.config中不起作用

问题描述 投票:0回答:1

我已尝试通过遵循web.config中的规则将pdf重定向到pdf

<rule name="r_1" stopProcessing="true">
  <match url="^/media/peedin5t/xxx.pdf$" ignoreCase="false" />
  <action type="Redirect" url="/media/beebz4yx/xxx1.pdf" redirectType="Permanent" />
</rule>

即使我已经清除了缓存,仍然无法正常工作

asp.net-mvc iis web-config iis-8.5 umbraco8
1个回答
0
投票

此规则对我来说很好用,请将^ / media / peedin5t / xxx.pdf $修改为^ media / peedin5t / xxx.pdf $。

<rule name="r_1" stopProcessing="true">
  <match url="^media/peedin5t/xxx.pdf$" ignoreCase="false" />
  <action type="Redirect" url="/media/beebz4yx/xxx1.pdf" redirectType="Permanent" />
</rule>
© www.soinside.com 2019 - 2024. All rights reserved.