Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect problem URLs from old version to new updated version #50

Closed
leao-nardo opened this issue Oct 20, 2020 · 4 comments · May be fixed by #51
Closed

Redirect problem URLs from old version to new updated version #50

leao-nardo opened this issue Oct 20, 2020 · 4 comments · May be fixed by #51

Comments

@leao-nardo
Copy link

ta quebrado todos lins antigos .
precisa segundo o proprio renne de : " uma view que pega "/problemas/exibe/" e redireciona para "/problems/""

@rennerocha rennerocha changed the title redirecionar a URL dos links antigos para a URL nova Redirect problem URLs from old version to new updated version Oct 21, 2020
@rennerocha
Copy link
Collaborator

From @leao-nardo :
Old links (before Django update migration) are not valid anymore. This is not good as these links are widespread over the Internet and we don't want them to be broken.

We need to create a new view that redirects URLs with the old format to the new one. For example:
Old URL: http://dojopuzzles.com/problemas/exibe/fizzbuzz
New URL: https://dojopuzzles.com/problems/fizzbuzz

This can be acomplished adding a new URL route that identify the slug and redirects to the right URL:
Old URL pattern: http://dojopuzzles.com/problemas/exibe/<slug>
New URL pattern: https://dojopuzzles.com/problems/<slug>

slug is the same in old a new versions, so if you get the slug from old URL, you can use in new URL as well.

@beingbiplov
Copy link

hey, can I work on this?

@rennerocha
Copy link
Collaborator

Sure you can!

@leao-nardo
Copy link
Author

leao-nardo commented Mar 26, 2021

seems like it's already done so i'm closing, right ?

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

Successfully merging a pull request may close this issue.

3 participants