title: django using provider url patch
body: <p>I am developing a django site that ,on my development environment, is accessed by the url localhost:8000.
  The url is automatically redirect to the url localhost:8000/accounts/login and, after login, to localhost:8000/iform/list.</p>
  
  <p>After deployed on my webserver, the app now is called icontrol, so, on the configuration panel of my provider, I set it to respond to the url www.mydomain.com/icontrol.</p>
  
  <p>When using the same files for development and deploy, after the login, instead  redirect to www.mydomain.com/icontrol/iform/list, for example, its trying to redirecting to to www.mydomain.com/iform/list.</p>
  
  <p>How to make it work correctly on both environments?</p>