apache - sub-domain directory redirection using htaccess -
I'm trying to redirect something like this
subdomain.domain.com/directory Domain .com / directory
I tried to redial the [htaccess file] that was placed in the 301 / domain.com/directory [subdomain, it works fine for the sub-domain But the subdomain will not work in the directory, the domain
Can anyone help me with the contents of the .htaccess file?
Thanks
If you just go to xxx.domain.com/yyy from www Want to redirect all requests. Domain.com/yyy You can use:
RewityCand% {HTTP_HOST}! ^ Www \ .domain \ .com [NC] rewrite% {HTTP_HOST}! ^ $ Rev. rt ^ / (. *) Http: //www.domain/com/$1 [L, R]
NB: You will need to make sure the rewriting engine for the first time Is it
Updated ..
If you want 301 now, change [L, R = 301]
to the last line [ L, R]
Comments
Post a Comment