I have an existing Wordpress site setup at mycompany.tld1 and recently registered mycompany.tld2.
I want to setup a 301 redirect from mycompany.tld2 to mycompany.tld1, what would that .htaccess file look like? Can I append it to the Wordpress .htaccess file using a conditional statement to check the inbound URL?
WP .htaccess (existing):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>