I'm trying to match any requests for a url that do not have a folder character (/) or end with an extension (.aspx). I can ignore querystring values and fragments in the regular expression for now. So far I have the following.
^([\w-/]+)(?!\.aspx|/)$
However, if I run this expression it selected the final / in the group which I don't want it to do. The goal is to append .aspx to urls that do not have it specified using Isapi ReWrite and then forward the request onto the .NET engine.
the example below shows all characters in a current match in bold
asd.aspx
this
something.aspx
this/test/ (dont want the final /)
this-test/ (dont want the final /)
this-test
this-test/that/test
Can anyone suggest an expression that would not select the final / if found in the expression?