301 redirect problem

I have a site which is hosted at a free web hosting service. There site url with www. doesn’t work. How do I send traffic which comes to www. url to none www. url with 301 redirect ?

I want to send http://www.mysite.com to http://mysite.com


First, WELCOME to SitePoint’s Apache forum.

Second, you can’t! That is a function of the DNS of the host which you will not be able to modify.