.htaccess - htaccess rewrite 3 conditions to real domain -


i want write short htaccess script rewrite following conditions, want whole website, not homepage.

eg.

  • domain.com redirects www.domain.org
  • www.domain.com redirects www.domain.org
  • domain.org redirects www.domain.org

note, needs work pages of site forced www.domain.org domain. example,

domain.org/contact-us/ redirects www.domain.org/contact-us/

and

domain.com/about/ redirects www.domain.org/about/

etc etc

appreciate help.

matt

rewritecond %{http_host} ^(domain.com|www.domain.com|domain.org)
rewriterule (.*) http://www.domain.org%{request_uri} [r=301,nc,l]


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -