Add www subdomain automatically to your domain with htaccess

Posted by on Aug 9, 2010 in Apache | No Comments

Sometimes we need to add the www to our domain automatically, maybe for aesthetics or ajax issues across subdomains. Apache .htaccess is our friend here. You just need to add this to your existing .htaccess file or just make a new one with the following contents: