Forums

redirects

Hi, I want to use python anywhere as a new host for the new website. I need to create redirects because the old website uses a different link structure. I read in the topic .htaccess is not possible on python anywhere. What would be a solution for the redirects?

Thanks in advance!

how many paths are you redirecting / or are you doing some sort of wildcard redirect?

there's broadly two ways to do this:

  1. setup something from your dns service provider level. eg: cloudflare has page rule redirects etc
  2. setup something from your webapp level. so eg: if you are using django, django itself can do redirects from urls.py etc

Hi Conrad , I have ± 40 redirects to do. Number 2 sounds better then DSNS.

Do you have a link that shows what and how the add this?

Do you have something like that in mind? The redirects app | Django documentation | Django

Sorry for the late reply, I don't receive notifications..

This doesn't work us, as I understand because of "dynamic urls"

If dynamic urls are an issue, then using Django to do your redirects is probably the right way to do it. Then you can use the code in Django to decide how to convert the dynamic urls.