View Single Post
Old 05-01-2007, 07:43 PM  
chaze
Confirmed User
 
Industry Role:
Join Date: Aug 2002
Posts: 9,752
Park em and add this into your htaccess:

Redirect to www or another domain (htaccess redirect)

Create a .htaccess file with the below code, it will ensure that all requests coming in to dwhs.com will get redirected to www.dwhs.com
The .htaccess file needs to be placed in the root directory of your website (i.e the same directory where your index file is placed) it will look like this:

Code:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^dwhs.com [nc]
rewriterule ^(.*)$ http://www.dwhs.com/$1 [r=301,nc]
Please REPLACE domain.com and www.dwhs.com with your actual domain name.

If you have a parked domain then add the same thing for the www. and without the www. version in the htaccess so ti will look like this:

Code:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^dwhs.com [nc]
rewriterule ^(.*)$ http://www.dwhs.com/$1 [r=301,nc]

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^dwhs1.com [nc]
rewriterule ^(.*)$ http://www.dwhs.com/$1 [r=301,nc]

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^www.dwhs1.com [nc]
rewriterule ^(.*)$ http://www.dwhs.com/$1 [r=301,nc]

Last edited by chaze; 05-01-2007 at 07:44 PM..
chaze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote