0

谁能说如何使用 Intelligencia.UrlRewriter 重写图像 url?

在页面 faqs.aspx 中,有一个图像。从数据库中检索图像并在 contentimage.aspx 中呈现。
图片来源是http://localhost/MySite/SG/FAQs/images/en/bridge_singapore.jpg
我必须改写为http://localhost/MySite/ContentImage.aspx?id=SG&type=FAQs&lang=en&filename=bridge_singapore.jpg

目前,我写如下,它根本不起作用。

<rewrite url="~/(.+)/faqs/images/(.+)/(.+).jpg" to="~/contentimage.aspx?id=$1&amp;type=faqs&amp;lang=$2&amp;filename=$3" />
4

1 回答 1

0

At last, I know my problem. :) ... It is due to my IIS setting. In the Handler Mappings, it only allows .aspx extension to be handled by aspnet_isapi.dll. So, I added custom handlers for .jpg extension to be handled by aspnet_isapi.dll. Now, it works fine. :)

于 2012-04-11T15:10:08.333 回答