I've searched the forums, but can't seem to find a working solution.
My main site is https www.domain.com
I would like the following domains to be redirected to it as well:
http www.domain.com http domain.com https domain.com
Added from comments:
Ok, what I have now is the following in vhost.conf for apache:
<VirtualHost :80>
ServerName www.domain.com
ServerAlias www.domain.com domain.com
</VirtualHost>
In my .htaccess I have the following:
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.)$ domain.com/$1 [R=permanent,L]
Everything works except domain.com which gives a not found error. Just to clarify the SSL is hosted by a CDN hence on the server so apache locally runs with port 80 only. – James 1 hour ago