URL重写到子文件夹后,是否有保留相对图像路径?

时间:2013-01-30 22:43:03

标签: asp.net iis-7 url-rewrite-module

我们设置了网址重写规则,以便:

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中是否还有其他一些技术可以使其工作?或者,是使用图像子文件夹的完整路径的唯一解决方案吗?

谢谢!

0 个答案:

没有答案