What should I be kept in .htaccess to redirect all links to the subdomain from the main domain? I feel like this but it is not wok:
rewrite% {HTTP_HOST} ^ http: //example.com/$ rewrite rule ^ (. *) $ Http: //subdomain.example Com / $ 1 [R = 301, L]
Did you Http : //
and in the first row /
in the end?
rewrite% {HTTP_HOST} ^ example.com $ [or] RewriteCond% {HTTP_HOST} ^ www.example.com $ RewriteRule ^ (. *) $ Http: //subdomain.example. Com / $ 1 [R = 301, L]
No comments:
Post a Comment