Search code examples
pythondjangopython-2.7webfaction

Admin redirect to domine.com/admin from domine.com/app/admin after login


Hi I've got a problem my problem is that I Have two apps in the same domine:

mydomine.com     it has the first app loaded.
mydomine.com/app2/ it has the second one loaded

If i go to :

mydomine.com/app2/admin 

I'm able to log in but after I log in the admin redirects me to:

mydomine.com/admin

And I want to be redirected to:

mydomine.com/app2/admin

Does anybody knows why this happen? How can I fix it?

Thank you :D


Solution

  • I'm going to answer myself because I found the answer and maybe it can be helpful for another person:

    The answer from WebFaction is that I had to add FORCE_SCRIPT_NAME variable to my settings and the value of this one in my case has to be app2