I have a dedicated server with many parked domains, my subfolders have the structure "domain.com/pages/username" and if the user purchases a own domain then do the redirect with this code in htaccess file:
RewriteCond% {HTTP_HOST} ^ mynewdomain\.com $ [NC] RewriteCond% {DOCUMENT_ROOT} /pages/username/% {REQUEST_URI} /-d RewriteRule [^ /] $% {REQUEST_URI}/ [R = 301, L] RewriteCond% {ENV: REDIRECT_STATUS} ^ $ RewriteCond% {HTTP_HOST} ^ mynewdomain\.com $ [NC] RewriteRule ^ (. *) $ /pages/username/$ 1 [QSA, L]
But now as there are several domains and htaccess file size is getting larger. I wondered if something similar can be done from the domain configuration without editing the htaccess file. I do not use subdomains, Can I use CNAME or something similar for new domains? htaccess file weight affects page load?
Is it possible?
Thanks guys.