MVC3 + WordPress IIS Url Rewriting Rules

admin

Administrator
Staff member
I have a ASP.NET MVC3 website located at <a href="http://mydomain.com/mymvcapp/" rel="nofollow">http://mydomain.com/mymvcapp/</a>. However, the root of the webiste (mydomain.com) contains a WordPress site running PHP. Therefore, I put the following IIS URL Rewrite rule to allow WordPress to function correctly via its rewriting mechanisms:

Code:
    &lt;rewrite&gt;
        &lt;rules&gt;
            &lt;rule name="wordpress" patternSyntax="Wildcard"&gt;
                &lt;match url="*" /&gt;
                &lt;conditions&gt;
                    &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /&gt;
                    &lt;add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /&gt;
                &lt;/conditions&gt;
                &lt;action type="Rewrite" url="index.php"/&gt;
            &lt;/rule&gt;     
        &lt;/rules&gt;
    &lt;/rewrite&gt;

So with this rule in place my WordPress functions perfectly, however, my MVC rewriting does NOT work. How would I alter this rule to allow both WordPress and MVC (under the /mymvcapp/ folder) to coexist nicely?