Is this .htaccess fix required for Google?

Discussion in 'Apache' started by hovesh07, Jan 7, 2008.

  1. #1
    Hi All,

    This is my first post on this board. I usually hang out on the CommissionJunction board.

    Anyhow, while reading an article on Google indexing, it claims I need to do the following to my .htaccess file:
    
    Options +Indexes
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^yoursite\.com
    RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=permanent,L]
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ http://www.yoursite.com/$1/ [L,R=301]
    Code (markup):
    Otherwise, google will think there are 4 versions of the site: with/without trailing slash and with/without "www"

    Is this true?
     
    hovesh07, Jan 7, 2008 IP