Knowledgebase: Hosting FAQ > Tips and Tricks
Point alias domains to a specific page on the main website
Posted by Jen Ferraz on 11 April 2011 02:39 PM

This allows you to point aliasdomain.com to maindomain.com/somepage.html


The code uses a 301 Redirect, which means that the maindomain.com is the one that will be indexed. This is the preferred method for handling redirects with search engines.

Add a file named .htaccess to your httpdocs/ directory containing, or append to your existing .htaccess file, the following contents, replace "aliasdomain.com" with your second domain name to redirect and "somepage.html" with your custom page:



RewriteEngine on
RewriteCond %{HTTP_HOST} aliasdomain.com$ [NC]
RewriteRule ^(.*)$ /somepage.html [R=301,L]
(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako support.miva.com/supportsuite/index.php?