Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Page not found always generates a redirect with APPEND_SLASH=True #1185

Closed
mihaisucan opened this Issue Feb 27, 2012 · 1 comment

Comments

Projects
None yet
4 participants

Django has APPEND_SLASH=True by default and that's cool because if you load example.com/foobar the common middleware appends a slash to the url if two conditions are met:

  • example.com/foobar does not exist.
  • example.com/foobar/ exists.

Otherwise, the slash is not appended, and no redirect happens. You just get the 404 page not found error, which is expected.

This works well, but django cms "tricks" the urlresolver to make it believe it can handle example.com/foobar/ or something like that, so the slash is appended and you get a redirect. Then you get 404 page not found.

Is this a bug in django or in django cms? I'm not sure, but i'd like it fixed. Thanks! ;)

Collaborator

ojii commented Mar 20, 2013

Not sure we should qualify this as a bug. If anything, this should be documented somewhere, but I'm not sure where. Otherwise we'd have to re-implement the CommonMiddleware, which is not feasible.

@FinalAngel FinalAngel closed this Oct 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment