My website uses ASP.Net Membership Services for handling site security, I'm also using the URL rewriting module for IIS 7. One of the issues that I'm having with the URL rewriting is when I go to access a restricted page it redirects me to the login page for my application, and the "ReturnUrl" shown is the raw URL and not the rewritten URL. So when I do enter my credentials and click the login button I get 404'd. Interestingly enough the authentication is actually working. After getting 404'd I can access the restricted URL without being redirected.