1
我有以下规则:IIS 7.5 URL重写2.0到HTML页
<rewrite>
<rules>
<rule name="FlowURLs">
<match url="^flows/[_0-9a-zA-Z-]+/[_0-9a-zA-Z-]+/([._0-9a-zA-Z-]+)" />
<action type="Rewrite" url="music.html?flow={R:1}" />
<conditions logicalGrouping="MatchAny">
<add input="{URL}" pattern="^.*\.(ashx|axd|css|gif|png|jpg|jpeg|js|flv|f4v|html)$" negate="true" />
</conditions>
</rule>
</rules>
</rewrite>
我所试图做的是如果URL进入类似如下:
http://localhost/flows/t/twit_nobone/twit_nobone1354334226132.mp3
我想将其改写为:
http://localhost/music.html?id=twit_nobone1354334226132.mp3
music.html驻留在根中,它具有样式表,javascript和图像。我看到的问题是,当它重写时,没有图像,js或样式表正在显示。当我检查的资源,它看起来像链接现在是
http://localhost/flows/t/twit_nobone/twit_nobone1354334226132.mp3/demo.css
http://localhost/flows/t/twit_nobone/twit_nobone1354334226132.mp3/images/screenshot.png
代替
http://localhost/demo.css
http://localhost/images/screenshot.png
我在做什么错?我还注意到,浏览器中的url永远不会改变为重写的。
你是一个生命的救星。一直在这工作几个小时! – nawlrus 2013-03-21 18:11:44