XF 2.1 How would I go about switching to a new domain, yet keeping all the old links so they redirect to the new ones?


Well-known member
Current forum url: https://forums.themavesite.com/
I also own https://tms.sx
Goal is to change all links to https://forums.tms.sx/
Use this in your .htaccess file in the root of themavesite domain (it can be an empty directory):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^forums.themavesite.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.forums.themavesite.com [NC]
RewriteRule ^(.*)$ https://forums.tms.sx/$1 [L,R=301,NC]
I'd also like "forums.themavesite.com" still to be found when searching "themavesite forums" in Google.
Any links containing forums.themavesite.com will redirect to forums.tms.sx so you won't lose pages already indexed in the search engines. However, eventually those old links will drop out and be replaced by the new ones.

Be careful editing your .htaccess file! Don't use Notepad - if you save it in the wrong format (needs to be Unix) it will bork your site. Use the editor in cPanel's File Manager or an editor like Notepad ++ with the options set to use Unix format.