Hacker News new | ask | show | jobs
by sciurus 5368 days ago
A more efficient and search-engine friendly approach is to perform a 301 redirect. For a single site, in Apache this would look like

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example\.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]