[Fixed]-Django Admin + FORCE_SCRIPT_NAME + Login redirects incorrectly

10👍

FYI, I gave up. All the documentation says it’s supposed to be easy. But it’s too much of a pain to deal with. I instead am requiring our Django apps to use a subdomain and setup a vhost with the server. This way Django can run at document root “/”

4👍

FWIW, I’ve written up a solution in another thread that’s worked for me when I have a proxy server in front of a Django server using wsgi.

As I remember troubleshooting this a long time ago… you saw the out-of-sync behavior because of the way the Django admin sets up and processes the next param on the form submit.

Based on my experience, Django sites should definitely use FORCE_SCRIPT_NAME to modify the way your backend generates links, and your proxy server should also strip out the subfolder (i.e. script-name) part of the path.

The other thread:

Host Django on subfolder

👤whp

Leave a comment