5👍
✅
Add this
location = / {
rewrite ^(.*)$ /index.htm last;
}
underneath the root
line to do a rewrite of the URI before further processing.
PS. You have probably sorted this out during the year since your asked, but here it is for other to see.
1👍
A better solution is you provide a / url in your urls.py is remove the
root /var/www/$2/htdocs;
Then only include the root in location {} blocks where you serve up static assets.
👤Mike
- [Django]-Custom logo in django jet
- [Django]-Reverse Django generic view, post_save_redirect; error 'included urlconf doesnt have any patterns'
Source:stackexchange.com