View Single Post
Old 10-05-2007, 07:22 AM  
Vick!
Confirmed User
 
Industry Role:
Join Date: Nov 2005
Location: 20 00'24.00" N, 75 09'00.00 W
Posts: 6,882
Quote:
Originally Posted by vendot View Post
OK so using this rewrite code, what do i need to do to make sure all my PR goes to domain.com

What is the code i need to put and where does it go?
Are you sure you want all your PR goes to domain.com but not www.domain.com?

If so,

(www to non-www version)

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
If you need reverse of this,

(non-www to www version)

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
__________________
Affordable Quality Web Hosting
Vick! is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote