Create 301 redirects from an old Discourse site to a new one

What would you like done?
I am moving content from an old Discourse site to a new domain and server (also Discourse). I’ve restored a backup of the old site on a new server with the new domain pointing to that IP address.

I need someone to setup 301 redirects from URLs my old domain to the new domain so that search engines recognize the move. Since this is restored from a backup, the URLs are one-to-one. For any old URL I should be able to open the network tab in inspect and see that:

https://domain-a.com/t/topic-name/100

has a 301 status code and redirects to

https://domain-b.com/t/topic-name/100

Because of SSL I believe this needs to be done with Nginx, but am open to other ideas.

When do you need it done?
Within the next week or two? The sooner the better, but I know schedules are a bit nuts with the holidays.

What is your budget, in $ USD that you can offer for this task?
$75

2 Likes

Drop me an email to bhanu@orng.co I can help with this.

2 Likes

I would just connect the old domain name to a cpanel hosting (or any hosting at all, something to host the domain) and then using htaccess make the redirect. Since the old domain is being redirected and all the content is already migrated, the goal is to redirect the old domain name to the new one. Considering that, it doesn’t matter if the old domain is still contented to a discourse install.

This way you don’t even have to keep the old server’s instance.

You can use something like this:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !new-example.com$ [NC]
RewriteRule ^(.*)$ https://new-example.com/$1 [L,R=301]

Above code will follow the old links to new ones. So if the old url is old-example.com/t/anything , it will be redirect to new-example.com/t/anything

6 Likes

Ah, this is an excellent idea that I had not considered.

Thank you!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.