Couple of bugs?

Topics: Rules, Setup
Aug 5, 2013 at 4:22 PM
Edited Aug 5, 2013 at 4:33 PM
..one is a documentation bug

Your readme doesn't mention anything about adding the RewriterProxyHandler handler, which means that anyone who follows the readme, pastes the provides <modules... tag into their IIs 7 web config, still gets a 404 when they write a set of rules that specify a [P]roxy

Please put this (or similar) into your readme file in the relevant location:

<handlers>
            <add name="RewriterProxyHandler" preCondition="integratedMode" verb="*" path="RewriterProxy.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
        </handlers>

The other, seems the RewriteCond cannot accept more than one server variable, yet apache documentation (and users) indicates their rewriter can

If I put this in my MF.R.txt :
#string concat the server vars, with :: in the middle. use a regex to capture
#everything after MY. in the host into %1 and everything in the query str into %2
RewriteCond %{HTTP_HOST}::%{QUERY_STRING} ^my[.]([^:]*)::(.*)$ [NC]
Then for a request to http://my.host/some.asp?key=value

I'm expecting to see something like this in the log:
2013-08-05T17:08:09 **********************************************************************************
2013-08-05T17:08:09 [Rewrite] Input: http://my.host/some.asp?key=value
2013-08-05T17:08:09 [Condition 0] Input: my.host::key=value
2013-08-05T17:08:09 [Condition 0]  Matched
2013-08-05T17:08:09 [Rule 0] Input: /some.asp
2013-08-05T17:08:09 [Rule 0] Rule Pattern Matched
2013-08-05T17:08:09 [Rule 0] Output: http://host/some.asp?key=value
What I actually see is this:
2013-08-05T17:08:09 **********************************************************************************
2013-08-05T17:08:09 [Rewrite] Input: http://my.host/some.asp?key=value
2013-08-05T17:08:09 [Rule 0] Input: /some.asp
2013-08-05T17:08:09 [Rule 0] Rule Pattern Matched
2013-08-05T17:08:09 [Condition 0] Input: my.host
2013-08-05T17:08:09 [Condition 0] Input: key=value
2013-08-05T17:08:09 [Condition 0]  Matched
2013-08-05T17:08:09 [Condition 0] Input: my.host
2013-08-05T17:08:09 [Condition 0] Input: key=value
2013-08-05T17:08:09 [Condition 0] Input: my.host
2013-08-05T17:08:09 [Condition 0] Input: key=value
2013-08-05T17:08:09 [Rule 0] Output: http://my.hostkey=value/some.asp?my.hostkey=value
Yikes.. what's all that?