edit htaccess to prevent duplicate content


/ Published in: HTML
Save to your folder(s)

This is to prevent duplicate content when your provider directs your http://domain.com to the same place as http://www.domain.com


Copy this code and paste it in your HTML
  1. Options +FollowSymlinks
  2. RewriteEngine on
  3. RewriteCond %{HTTP_HOST} !^www. [NC]
  4. RewriteCond %{HTTP_HOST} !^$
  5. RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.