Using ASP.NET MVC3, how can I have IIS not redirect 302 on case-sensitive routing?
For example, I create an application folder under my site called "Admin" in IIS. The javascript (there are hundreds of files, no trivial change, and then when new code gets generated or written, we have to manually case-enforce on all routes? I think that's overkill) and some of the handwritten links all point to /admin/ControllerName/
or /admin/controllername/
already, and so when IIS sees this, it issues a 302 to /Admin/ControllerName/
. Obviously (I tested to confirm) just changing the case prevents the 302.
Every image, javascript include, etc, causes two hits to IIS.
How can I reduce the traffic and just have IIS go ahead and reroute me case-insensitively so we can stop all the silly 302's. Or is this impossible and I should go case-enforce every potential URL forevermore in all the code we write? Or do I just need to suck it up and live with the 302's?