I want a subdomain to mirror the root-domain (ex: sub.root.com mirroring root.com) and I want to accomplish this via .htaccess or php, with .htaccess prefered.
I want a subdomain to mirror the root-domain (ex: sub.root.com mirroring root.com) and I
Share
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^((subdomain).)?([a-zA-Z0-9-]+.([a-zA-Z]{2,3}(:[0-9]+)?))$ [NC]
RewriteRule ^(.*)$ /%{REQUEST_URI} [QSA,L]