www.mysite.com & mysite.com have a different pagerank. any ideas on how to redirect mysite.com to www.mysite.com. does pr & ibl will also be passed with this redirection.
You need to use a 301 as right now they are two different sites. When you do that all the links will follow.
If you're on an Apache Server with mod_rewrite configured you could use this code in your .htaccess file: RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC] RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301] Code (markup):
Thanks RB, I've been meaning to do that for a while but it's a sod of a thing to search for on Google.
does anybody know of a site where it uses a 301? wherein after typing mysite.com it will then redirected to www.mysite.com thanks for the info.
I do it too on my Danish Ceramics website. I was (and is) a newbie, but got along with some good advice from the forum at http://www.mod-rewrite.com/forum/ It's a good place - though not as fully populated as dp
RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC] RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301] Code (markup): Thate code also rewrites subdomains e.g. subdomain.domain.org -> www .subdomain.domain.org Is there an easy modification so that it only redirects the root domain (without the www). Thanks