Tuesday, February 25, 2014

How to resolve Canonical Issue For Html Website

Code for resolving canonical problem

How to resolve Canonical Issue For Html Website
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourwebsite.com [nc]
rewriterule ^(.*)$ http://www.yourwebsite.com/$1 [r=301,nc]

Options +FollowSymLinks
RewriteCond %{THE_REQUEST} ^.*/index.html
RewriteRule ^(.*)index.html$ http://www.yourwebsite.com/$1 [R=301,L]

1 comment: