1👍
✅
The reason it is doing this has nothing to do with django, but rather because you have relative links in your template.
If you are already at a link http://localhost/foo
, and you place a link such as <a href="bar/zoo">link</a>
, then the resulting URL will be http://localhost/foo/bar/zoo
, and not http://localhost/bar/zoo
.
You need to adjust your template so that you are using absolute links.
Source:stackexchange.com