Requested url(s):
http://domain.com/about
http://domain.com/contact
etc.
Actual location of the about page and the other pages aswell:
http://domain.com/folder/about.cshtml
http://domain.com/folder/contact.cshtml
- The requested url should rewrite to the actual location.
- But the pattern shouldn't match: http://domain.com
!
Else it would unstyle the homepage.
Here is my try at it:
<rule name="friendly_url">
<match url="(.+)/([-a-z]+)" />
<action type="Rewrite" url="http://{HTTP_HOST}/folder/{R:2}\.cshtml" />
</rule>
Obviously this will effect the homepage.
Even worse; it doesn't work at all. I can't get the rewrite to work properly.
Any contribution to the solution is much appreciated :)