I want example2.com
to always appear in the address bar and show the content of my site example1.com
.
I applied this solution, but if I enter example2.com
, it redirects to example1.com
but the address appears as example1.com
.
https://www.virtualmin.com/documentation/tutorial/how-to-create-virtual-server-alias/
In my .htacccess
I have this code:
ReWriteEngine on
RewriteCond %{HTTP_HOST} ^example2.com
RewriteRule ^(.*) example1.com/$1 [P]
ReWriteRule ^sitemap/list_([0-9]+).xml$ user-uploads/sitemap/list_$1.xml [L]
ReWriteRule ^sitemap.xml$ user-uploads/sitemap.xml [L]
What can I do? I need example2.com
to appear in the address bar, and always show the content of example1.com
.