Last updated 2 years ago by Vitor Freitasdjango
Django comes with a few optional apps that can easily be installed. One of those apps is the Redirects App, which is particularly useful in the cases where you want to update some existing URLs without compromising your Website SEO or in any case avoid 404 errors.
It basically works by creating a table in the database with two columns, oldpath and newpath. Every time your Website raises a 404 error, the Redirects App will intercept the response and check this particular table for a match. If the requested URL is found in the column oldpath, instead of raising the 404 error, it will redirect the user to the newpath returning a 301 code (Moved Permanently).