views:

234

answers:

1

Have a IIS7 URL rewrite rule which uses friendly url so for example regEx is ([A-Za-z]+)/([A-Za-z]+)

www.mysite.com/genetics/overview

gets rewritten to

www.mysite.com/genetics/default.aspx?a=overview

Now I need to change the RegEx so it excludes the Content folder and any subdirectory in this folder. Been trying a few examples with no luck so far it either gives me back a 404 or no improvement to the current page (which loses all it's images and styles). Anyone have or know a RegEx that will select any folder other than a certain Named folder like Content?

A: 

Never mind found that in IIS for a directory you can ignore the rule. Applied that now all is working good.

  <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
    <add input="{URL}" pattern="WebResource.axd" negate="true"/>
  </conditions>
Jason Too Cool Webs