I've developed a small website in VS2012 that utilizes the following rewrite in web.config
:
<system.webServer>
<rewrite>
<rules>
<rule name="DynamicRewrite" stopProcessing="true">
<match url="(.*)"/>
<action type="Rewrite" url="Default.aspx/{R:1}"/>
</rule>
</rules>
</rewrite>
</system.webServer>
This works beautifully in IIS Express on my dev machine, but the server is running IIS 6, and the rewrite fails (I get 404 on URLs that should have worked).
I found this post, but it talks about .asax
files, i.e. a web application. I only have a simple website with Default.aspx
and some custom classes.
Is there any way for me to make this work? Basically, I want to be able to do it in web.config
or my aspx-file, but I have full access to IIS so I can configure there as well, if that's what it takes (although I don't know how -- IIS 6 is really scary).
Currently, I'm on .NET 4.0 but I can always lower to 3.5 if needed (heard there were some rewriting-issues on extensionless URLs with 4.0, but I never really got the gist of it).