I've an Ubuntu Server that runs Apache w/ Virtual Hosts. I operate a website using the primary domain as "mydomain.com" and it is situated in /var/www/mydomain.com.
Presuming I own multiple domains (each having a different tld), what's the easiest method to make certain all of them indicate "mydomain.com" (the main site).
Quite simply, do you need to create an .htaccess file in /var/www which has multiple 301 redirects for sites like "mydomain.internet" and "mydomain.org" that could indicat "mydomain.com"?
Try something similar to this:
<VirtualHost 22.214.171.124:80> DocumentRoot /var/www/mydomain.com ServerName mydomain.org ServerAlias mydomain.net mydomain.info mydomain.me RedirectPermanent / http://www.mydomain.com/ </VirtualHost>