Hello,
I have 3-4 domain with the same material or post, and i have connect mydomain.tk with mydomain.online and i put these codes in .htaccess!
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# Begin Redirect code
RewriteCond %{HTTP_HOST} ^mydomain\.tk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.tk$
RewriteRule (.*)$ http://mydomain.online/$1 [R=301,L]
# End Redirect code
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
and work perfect redirect mydomain.tk/post1 to mydomain.online/post1, and all post redirect to new domain etc etc…
The problem is can’t connect more than 1 domain.
i have try with this code
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
# Begin Redirect code
RewriteCond %{HTTP_HOST} ^mydomain\.pw$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.pw$
RewriteCond %{HTTP_HOST} ^mydomain\.tk$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.tk$
RewriteCond %{HTTP_HOST} ^mydomain\.xyz$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.xyz$
RewriteRule (.*)$ http://mydomain.online/$1 [R=301,L]
# End Redirect code
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
with code not work any domain, how do riderect more than 1 domain.
Thx