Opened 11 years ago
Closed 11 years ago
#21749 closed Bug (duplicate)
LocaleMiddleware creates wrong redirects when combined with script prefix
Reported by: | Tilman Koschnick | Owned by: | nobody |
---|---|---|---|
Component: | Internationalization | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | til@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If a Django instance is mounted with a prefix, e.g. with
WSGIScriptAlias /some_prefix /path/to/wsgi.py
and i18n_patterns are used, the generated redirect urls have the language prefix before the script prefix, e.g.:
http://host/some_prefix/some_path/ -> http://host/en/some_prefix/some_path/
Correct would be to put the language prefix between script prefix and the rest of the path:
http://host/some_prefix/some_path/ -> http://host/some_prefix/en/some_path/
The attached patch fixes this, pulling the required bits from request.META.
Attachments (1)
Change History (3)
comment:1 by , 11 years ago
Cc: | added |
---|
by , 11 years ago
Attachment: | locale_middleware_redirect.diff added |
---|
comment:2 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This is a duplicate of #21579