How to 301 redirect django url with multiple slashes on url path?

8 views
Skip to first unread message

Tanata Giventa

unread,
Apr 21, 2022, 3:47:35 PM4/21/22
to Django users

I am trying to figure out how to redirect properly some urls that contain multiple slashes and create a permanent 301 redirect whenever the slug changes.

For example:

A - https://example.org/category/subcategory/article-name-A

B - https://example.org/category/subcategory/article-name-B

I want to redirect the A to B. I tried the default redirects app from django but did not work with multiple slashes. What is the correct approach here?!

Reply all
Reply to author
Forward
0 new messages