You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
want to redirect /foo AND /foo/ (obviously) to /bar/
whne LocaleMiddleware is enabled, together with i18n_patterns in urls.py, we'll have to enter two redirects, with and without slash - as /foo/ is not a valid url (as checked in CommonMiddleware, about here: https://github.com/django/django/blob/main/django/middleware/common.py#L71 ), and because of that, no redirect to /foo/ is made (but, instead, to /language/foo/).
One approach could be to check for Redirects with and without slash at the end, when there is no slash at the end of the current path. Or even try a "ignore the slash at the end" approach, making the final slah irrellevant. This would enhance usability for redirect editors, as currently, one is often forced to enter redirects with and withouth the trailing slahsh.
The text was updated successfully, but these errors were encountered:
want to redirect /foo AND /foo/ (obviously) to /bar/
whne LocaleMiddleware is enabled, together with i18n_patterns in urls.py, we'll have to enter two redirects, with and without slash - as /foo/ is not a valid url (as checked in CommonMiddleware, about here: https://github.com/django/django/blob/main/django/middleware/common.py#L71 ), and because of that, no redirect to /foo/ is made (but, instead, to /language/foo/).
One approach could be to check for Redirects with and without slash at the end, when there is no slash at the end of the current path. Or even try a "ignore the slash at the end" approach, making the final slah irrellevant. This would enhance usability for redirect editors, as currently, one is often forced to enter redirects with and withouth the trailing slahsh.
The text was updated successfully, but these errors were encountered: