我们设置了网址重写规则,以便:
www.MySite.com/bhgre /
重写
www.MySite.com/landingpages/bhgre.aspx
<rewrite>
<rules>
<rule name="BHGRE" stopProcessing="true">
<match url="bhgre/?$" />
<action type="Rewrite" url="/landingpages/bhgre.aspx" />
</rule>
</rules>
</rewrite>
重写工作正常,URL保留在/ bhgre。但是,实际网页在其自己的子文件夹(即images / image1.png)中使用了相对于图像的路径。页面正在获得404,因为图像是从
中提取的www.mysite.com/images/image1.png
而不是
www.mysite.com/landingpages/images/image1.png
在URLRewrite中是否还有其他一些技术可以使其工作?或者,是使用图像子文件夹的完整路径的唯一解决方案吗?
谢谢!