I have a domain e.g. named www.example.com, when people type in example.com, it still can be accessed, but won't automatically add that 'www' to the url.
But as for website like facebook, if you type in facebook.com, it'll automatically add that 'www', BEFORE loading the page for you.
Probably I didn't explain it well, but guess you see the difference and get my point anyway.
So how can I make my domain acts like facebook, when people type example.com, it'll automatically add that www for them?
EDIT: Ok, so I need a redirect to the 'www' subdomain. Actually I'm using nodejs, which hosted on Amazon EC2, to serve the webpage instead of Apache HTTP. So any equivalent of .htaccess in nodejs area? I guess now the question shifts to more nodejs oriented, and it turns out it becomes a redundant of this thread: Redirect all requests using Express 3?
Thanks all for your help.