.htaccess - htaccess multi domain redirect -


How we can set it up. For multiple domains for different domains Htacess

This is what I've got so far.

Rewrite / rewritecode on rewitbank% {HTTP_HOST} ^ (www)? Domain.com $ RewriteRule ^ (/) "$ domain [L]

then redirect to www.domain.com www.domain.com/domain

Now I want to delete the folder so that I only need www.domain.com

Next I need it for 3 domains.

  • www.domain.com -> / domain
  • www .foo.com -> / foo
  • www.bar.com -> / bar

:

  rewit signing on above rebase / rewritten% { THE_REQUEST} \ / + ([^ /] +) Relateconded% {HTTP_HOST} //% 1 ^ (www \.)? (. +) \ .com // \ 2 $ [A C] Rev. Rule ^ ([^ /] +) (. *) $ / $ 2 [L, R] rewrite% {HTTP_HOST} ^ (www \.)? (. +) \ .com $ [NC] rewrite angle% 2 // $ 1! ^ (. +) // \ 1 $ rewrite rule ^ ([^ /] +) (. *) $ /% 2 / $ 1 $ 2 [L]  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -