title: ASP.NET forms authentication doesn't work with reverse proxy
body: <p>I have an ASP.NET application. As well as local users accessing the application directly, I want to expose it to external users through a reverse proxy (which is running on a different machine in the DMZ)</p>
  
  <p>for example, say internal users use the URL <a href="http://intranet1/myApplication/default.aspx" rel="nofollow">http://intranet1/myApplication/default.aspx</a>, external users might use the URL <a href="http://www.mycompany.com/externalApplication/default.aspx" rel="nofollow">http://www.mycompany.com/externalApplication/default.aspx</a></p>
  
  <p>this is quite simple to set up with URL rerwiting, but there is a problem when forms authentication is turned on. if an external user hits the URL site, forms auth tries to automatically send them to the login page which redirects them to the relative url /myApplication/LoginPage.aspx. as far as the web app is concerned, the application root is at /myApplication not /externalApplication. Of course the external user coming in through the firewall does not understand this URL so the request fails with a 404</p>
  
  <p>is there a sensible solution for this?</p>