Assuming you’re going to remove the current forum, it’s just a normal Apache or nginx redirect.
For nginx
server {
server_name original.example.com;
location / {
rewrite ^/(.*)$ https://new.example.com/$1 permanent;
}
}
or Apache
RewriteEngine On
RewriteRule ^(.*)$ https://new.example.com/$1 [R=301,L]
I had missed the part where you’re only moving Discourse and not migrating. Since you’re only moving domains, you don’t need the permalink redirects.