Force redirect domain with "www"

yanxing / 2014-04-16 13:41:58   

now
domain.com
domain.com
can be both fine be visited, I would love to know is there have some method can maybe the domain forced with "www" no matter how the visitor with/without "www" typing~
thanks

Vaska A / 2014-04-16 13:53:38   

Search Google for that - it's a simple thing you can do via htaccess if I'm correct.

yanxing / 2014-04-16 14:30:12   
  1. I tried
  2. RewriteCond %{HTTP_HOST} !^domain.com$
  3. RewriteRule ^(.*)$ domain.com/…]
  4. in ".htaccess" 

but it didn't work~

yanxing / 2014-04-16 14:30:41   

there have the same question on internet, please check:stackoverflow.com/questions/9193853/…

This thread has been closed, thank you.