How to enforce users to use www. with .htaccess?
Date added: Sunday, 17 January 2010 |
Last revised: Wednesday, 27 January 2010 |
Hits: 312
Answer
You may wish to apply this code into your .htaccess IF you are experiencing errors with the leech system where the site is added as http://www.mysite.com" target="_blank and a user enters from mysite.com ( no www. ) or vice verse.
to direct a user to your site WITH the www. - add this to your .htaccess changing mysite.com to your own domain.
to direct a user to your site WITHOUT the www. - add this to your .htaccess changing mysite.com to your own domain