apache - Redirect subdomain with www. Code without www is working (Wildcard) -
Now I have the rule in the .htaccess redirect ( is on wildcard ) several subdomains of other domains
For example: subdomain123.domain.com -> other- domain.co.uk/subdomain123
but do not work with redirect www . For example: www. Subdomain123.domain.com -> Other- domain.co.uk/subdomain123 - ** 404 Error - Please help with www.
rewrite angle% {http_host}. RewriteCond% {http_host}! ^ Domain.com [NC] rewrite code% {http_host} ^ ([^.] +) \. Domain. [NC] rewritable ^ (. *) Http://other-domain.co UK /% 1 [R = 301, L, QSA]
Alternatively matches a "www":
rewrite% {http_host}. RewriteCond% {http_host}! ^ Domain.com [NC] RewriteCand% {http_host} ^ (www \.)? ([^.] +) \. Domain.com [NC] rewritable ^ (. *) Http: // other-domain.co.uk/%2 [R = 301, L, QSA]
Comments
Post a Comment