I want to write a simple rule that says if someone requests "http://localhost/test" or "http://localhost/test/" then execute "http://localhost/test/service.svc/".
The following rule handles "http://localhost/test/" fine, but not "http://localhost/test".
<rule name="service root" enabled="true" stopProcessing="true">
<match url="^/?$" />
<action type="Rewrite" url="service.svc/" appendQueryString="false" />
</rule>
The failed request tracing shows:
URL_REWRITE_START RequestURL="/test", Scope="Distributed" 00:01:46.297
RULE_EVALUATION_START RuleName="service root", RequestURL="", QueryString="", PatternSyntax="ECMAScript", StopProcessing="true", RelativePath="/test/" 00:01:46.297
RULE_EVALUATION_END RuleName="service root", RequestURL="test", QueryString="", StopProcessing="true", Succeeded="false" 00:01:46.297
URL_REWRITE_END RequestURL="" 00:01:46.297
Given our hosting configuration and deployment constraints, I need this rule to exist in the web.config of the "test" directory.
Ideas anyone?
Thanks.