Categories
CentOS 5.3 Tutorials CentOS 5.4 Tutorials CentOS 5.5 Tutorials CentOS 5.6 Tutorials CentOS 5.7 Tutorials

301 Redirect

Permanent 301 Redirect

Search engines may think www.example.co.za and example.co.za are two different sites.You should set up a permanent redirect (technically called a “301 redirect”) between these sites. Once you do that, you will get full search engine credit for your work on these sites.

In example.co.za html root folder create the following:

# vi .htaccess
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.co.za [nc]
rewriterule ^(.*)$ http://www.example.co.za/$1 [r=301,nc]

+George Rushby

By George

Technical Samurai specializing in open source IT Automation and Cloud Infrastructure.