Safe Way to Redirect One Domain To Another?

Discussion in 'Apache' started by EGS, Jun 12, 2007.

  1. #1
    Hello.

    Is there a safe way to redirect an entire domain to another? What I want to do is gain backlinks and traffic to domainname.com but redirect it to domain-name.com, so when a visitor or search engine tries to go to either domainname.com or www.domainname.com, they will be SAFELY (no search engine penalty) redirected to www.domain-name.com

    If the visitor or search engine, for some reason, types in domainname.com/page.htm or domainname.com/dir/page.htm, I want that query to automatically be SAFELY redirected to domain-name.com/page.htm OR domain-name.com/dir/page.htm automatically recognizing and redirecting the query properly.

    Upon this, I was wondering if this way will PASS the Google PageRank of domainanme.com to domain-name.com, or will it just have domainname.com get the PageRank and/or domain-name.com get the PageRank? :confused:

    Thanks for the help in advance. :)
     
    EGS, Jun 12, 2007 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Options +FollowSymLinks +Indexes
    RewriteEngine on
    RewriteBase /
    RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

    But with your anti-mod_rewrite server...I'm guessing it won't work!!! :D:D:D:D
     
    Nintendo, Jun 12, 2007 IP