I've seen similar issues but none seem to really correspond to the problem I have now...
I have the IIS7 url-rewrite-module and I'm trying to establish what I believe is "simple" rewrites. Here's what I'm using:
<rule name="PPConnectDesigner" enabled="true" stopProcessing="true">
<match url="^en/planetpress_connect_designer/(.*?).(html|htm)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="/robohelp/server?area=en&mgr=agm&agt=wsm&wnd=Connect Designer|defaultwindow&tpc=/robohelp/robo/server/en/projects/Connect Designer/Designer/{R:1}.htm&RINoLog28301=T&ctxid=&project=Connect Designer" appendQueryString="true" logRewrittenUrl="false" />
</rule>
This gives me a 404
error, and the detailed error information has the Handler as StaticFile
and the Error Code is 0x80070002
... however, the Requested URL is the right one, if I just copy it from the error page and paste it in another browser tab, it works fine.
Also, if I change the rule from a Rewrite to a Redirect, it works perfectly!
ADDITIONAL INFO
One thing I realized is that I do have some rules that work with rewrites. And, other than the fact that the ones that work point to files that aren't html (I've got a CSS and some javascript in there) there's only once very clear difference: the ones that don't work are pointing towards an HTML page served by a Tomcat application (specifically, RoboHelp Server). I'm wondering if that's not a relevant point: what if IIS's redirection has trouble seeing a page served by tomcat, whereas my browser has no issue with it?
You may want to check the iis logs. They should tell you what path iis was trying to serve when the 404 happens
rewrite is internal, within same server, so the server looks for page itself and doesn't ask tomcat to look for it.
always use redirect if you are already making url visible to user
http://forums.iis.net/t/1174487.aspx?How+does+URL+Rewrite+differ+from+HTTP+Redirect+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With