i'm looking at migrating some sites over into enhance, but some of the domains are basically just redirects.
this works fine on their current panel as a site (vhost) can be created without the www subdomain and i can host a domains dns with the website elsewhere.
in enhance, it doesn't look like there's any way to create a vhost / add a domain without the www subdomain, and i can't create a dns zone without adding the domain of an externally hosted website to a vhost.
so i'm wondering if this will work in enhance..
for a redirect from mydomain.uk to externally hosted site via www.mydomain.uk
eg, add domain/website (www.)mydomain.uk and in the dns, the @ A record points to this webserver.
the www subdomain is a CNAME to myexternalwebsite.co.uk. and a 301 redirect is configured to redirect
mydomain.uk to https://www.mydomain.uk
it warns about a redirection loop... and the .htaccess file has:
RewriteCond "%{HTTP_HOST}" "^(www.)?mydomain.uk$"
RewriteRule ".*" "https://www.mydomain.uk/%{REQUEST_URI}" [R=301,L]
so i should just remove the '(www.)?' from the RewriteCond line, is this enough in enhance for this to work without problems? or does the www subdomain need to be removed from the vhost config? if so, how do i do that so that it survives future changes (server is using openlitespeed)
for another vhost, mydomain.co.uk redirects to mydomain.com, which is fine, except i'm supposed to be hosting the dns for mydomain.com but the mydomain.com website itself is hosted externally. (wix)
i just add mydomain.com as an alias and host the dns normally.. @ A record points to wix server and www is CNAME to pointing.wixdns.net. which should be fine for anyone going directly to mydomain.com, but for anyone going to mydomain.co.uk, will it redirect properly, or will OLS recognize it also has the mydomain.com configured locally and serve that instead?
can't test something like this just with editing hosts files, and i want to know if it'll cause problems before i change any live dns...