I am attempting to set up Url Rewriting in IIS7 using its Url Rewrite module, but have been unable to find any documentation on how this interacts with the authentication module (excepting that http://msdn.microsoft.com/en-us/library/ms972974.aspx tells me I can't use digest authentication).
When setting authentication (for example, windows authentication), which URL(s) should I be setting it on? The friendly one? The rewritten one? All of them?
What I am doing at the moment is:
- Our app is deployed with a version number, and will understand http://machine/AppName_Version/Services.aspx/...
- To avoid changing the url people use when we deploy a new version, we have a rewrite rule which changes http://machine/StaticUrl/...to http://machine/AppName_Version/...
- To work around the rewriting across application pools problem, there is a dummy web application at http://machine/StaticUrl which uses the same application pool as the deployed application.
- We also have a url rewrite for http://machine/AppName_Version/Services.aspx/... to http://machine/AppName_Version/Services/... for aesthetic reasons.
- These rewrites appear to be working correctly apart from the authentication.