Forum Moderators: phranque
/page-one.html could be accessed by (www.)example.com/page-one.html and by (www.)example.co.uk/page-one.html and you want to avoid that. .htaccess file on the server: # Redirect all requests for any hostname other than
# exactly "www.example.com" to "www.example.com".
# Preserve all path and query string data in the redirect.
RewriteCond %{HTTP_HOST} !^(www\.example.\com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] example.co.uk or www.example.co.uk or example.com are redirected to the same page at www.example.com instead.