Skip to main content
Topic: How to exchange the URLs of two forums? (Read 1080 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to exchange the URLs of two forums?

Hello!

I recently converted a SMF forum to ElkArte. Both are in the same database.
Both forums are still online, but the SMF will sometime be deleted.
Now I want to exchange the domains of the forums.

The domain http://forum.homepage.de of the old SMF forum shall now redirect to the new ElkArte forum, and the current domain http://forum2.homepage.de of the ElkArte shall - the other way around - redirect to the old SMF.

How do I have to proceed now, so that the paths and redirects in the forums will be changed correctly?
Would it be right this way?:

1) First execute the repair settings at each forum and enter during it not the paths and URLs of the current forums, but of the future ones?
2) Then change the domain forwarding at my hoster to the new directories on the server?
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: How to exchange the URLs of two forums?

Reply #1
That's exactly how I would do it (with some devil in the detail).

Put the forums into maintenance mode.

Backup the databases (individually), and the webserver directory's.

Check the domains behave correctly by changing your local hosts file (this will allow your computer to resolve the DNS for the domains rather than relying on the domain DNS. Note you may also have to alter the forum server configs (vhost, or whatever mechanism is used to associate the domains as a valid responder to the domian name query). If you are on hosting with a shared database you may well have to move the forum php files between the two domains....other scenarios may well exist.

Pointing to the respective domains using the local host file, change the forum settings with repair_settings.php. Test. Remove repair_settings.php as soon as possible.

Change the DNS records on your domian to point to the new server locations. Note...if it's the same server, and the same vhost within it, the DNS records for the domain may not change.  IT MIGHT JUST BE THE SERVER SETTINGS/Config that changes. (look at your dns if the domains point to the same ip address, then it's the vhosts on the server that point the domain name query to the correct hosting environment...not the DNS.

For example - I've been hosting my forum on three different platforms recently.

1. - A vps with multiple domains hosted on a plesk control panel (here, DNS records stay the same, the database can be on the same server and accessible from both domains - depending on how the database is created and which users have what access). The webserver files have to be moved from one domain to another (and vica versa).

2. A vps just serving one domain name. - point the external DNS to the server that hosts domain, and change the hostname of the server to the domain name.

3. Docker containers behind a reverse proxy. - All the domains have the same DNS, pointing to the same server. Each domain is served from a containerised environment tailored to the application (elkarte, wordpress, whatever).  Ports are exposed from the container, and nginx is used as a reverse proxy to map domains to containers.

Long story short - It depends on your specific hosting environment, how it is configured, what is accessible from where, and what tools are at your disposal.

You may need a strategy to (say) host the two domains in an intermediate place, then bring them mainly up to date, test them with the host file rather than changing the DNS....and then when you are sure all is broadly okay just put the existing forums into maintennance, update the databases for the target hosting, and then change the external DNS (or change thew nameservers). That will make the downtime less, because you have done 99% of the work beforehand. I have been known to use digitalocean, or OVH droplets for a month to be the transition server, then move the modified hosting back the the 'long term' environment.

Re: How to exchange the URLs of two forums?

Reply #2
Thanks for your detailed explanation!
Both forums have recently been SSL encrypted. Do I have to pay attention to something therefore or is that not important?
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: How to exchange the URLs of two forums?

Reply #3
I think ssl is deprecated in favour of tls.

Irrespective you will probably have to have a certificate, either self-signed (which most browsers will flag your site as being unsafe with), or through a certificate authority (most people commonly use letsencrypt not least because it's certificates are at no cost).

How again depends on your hosting environment.  You may have a control panel (like plesk) that handles certificates for you. You may use something like apache, in which case you need to look at the apache documentation (or nginx documentation if you use that as your webserver). This may be  a manual process, and you need to setup a script to renew automatically....or it might be handled for you by the tools you have. I have an nginx-proxy containerised setup that requests and renews certificates automatically.

It entirely depends on the hosting/server environment you have in place.

 

Re: How to exchange the URLs of two forums?

Reply #4
Everything went without any problems and quickly.
First, I made backups of the database and the directories on the server. In addition I also renamed the two directories.
Overall, I proceeded in this order:

1) Data backup.
2) Renamed the directories on the server.
3) Changed the redirects of the two subdomains to the new directories.
4) Executed the repair settings for each forum and entered the data of the new paths, URLs, and other data.
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0