Forum Moderators: phranque
I have created the .htaccess file in the root of my web folder (/var/www/html/) with the following lines:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Whenever I type example.com on the browser it takes me to www.example.com, so it seems to do the trick. Does it look alright in terms of carrying PR across to the www. enabled version of the domain? Am I right to have included the trailing slash (before the $1). I wasn't 100% sure about that.
Thank you in advance
[edited by: jdMorgan at 1:34 pm (utc) on April 19, 2006]
[edit reason] Formatting [/edit]