I have a view (Let's call it handle_login_redirection
) that handles log-in from a url and redirects to an appropriate url based on the request. This has been working fine.
Now when I use a custom domain and add the r'^$'
pattern to my urlconf
so that the Top Level Domain (TLD - www.mysite.com) is redirected to the same view that handles login (i.e handle_login_redirection
), I can see that the urls are not rewritten in the browser even when the page is correctly redirected.
Even other urls on the site, while they are directed fine, do not change to their corresponding url path and instead show the TLD in the browser. Is there anything wrong with the url pattern or is there a better way to handle TLD redirects?
Also note, I'm deployed to Heroku and there is no Nginx,Apache to configure url rewrites.