I've just migrated from IIS6 svr2003 to IIS7.5 server 2008r2 and installed the url rewrite. That all works great. The website in question is large and running under .net 2 integrated pipeline. Can't redo in .net 4 at this time. I'm brand new to this and a bit out of my depth here. I'd really like to use the rewrite functionality, but I need the sub-app to work also. Any help would be appreciated.
But, a sub virtual app from an outside vendor has a problem with the rewrite section of the webconfig. I comment it out and the sub virtual works great. I've looked on the web and tried a few things:
<location path="." inheritInChildApplications="false">
or
<location path="." allowOverride="true" />
wrapped around the rewrite module give me: The system.web element has invalid child element location.
I tried right under the system.web in the sub virtual app's webconfig but even with the rewrite commented out - this gives an error. I could try the remove, but wondered if someone could give me some insight on this problem.
Here's the basic rewrite:
<rewrite>
<rules>
<rule name="RedirectUserFriendlyURL1" stopProcessing="true">
<match url="^sethsBrochure.pdf$" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
</conditions>
<action type="Redirect" url="path/path/doc.pdf" appendQueryString="false" />
</rule>
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^sethsBrochure$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="path/path/doc.pdf" />
</rule>
</rules>
<outboundRules>
<rule name="OutboundRewriteUserFriendlyURL1" preCondition="ResponseIsHtml1">
<match filterByTags="A, Form, Img" pattern="^(.*)path/path/doc\.pdf$" />
<action type="Rewrite" value="{R:1}/ path/path/doc" />
</rule>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>