Redirect to main domain


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

Avoid penalties for duplicate content. Also see
<a href="http://sitening.com/blog/htaccess-redirects-to-a-single-hostname/">How to Stay Safe from Duplicate Content by Using .htaccess and 301 Redirects</a>.


Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteCond %{HTTP_HOST} !^sitening.com
  4. RewriteRule (.*) http://sitening.com/$1 [R=301,L]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.