How Should I Forward My Whole Domain?

Discussion in 'Domain Names' started by meamrussian, Jun 17, 2007.

  1. #1
    I have a website that I no longer want up anymore, so instead of just taking it down, I want to make use of its traffic and forward it to another site of mine. How should I do this? I don't just want to forward the domain itself, but every subdomain or file that can be accessed through this site. How should I do this? Using the domain forwarding in my registrar takes time to take effect, and anyway last time I tried it didn't work. Perhaps there's a way using javascript, or htaccess?

    Thanks.
     
    meamrussian, Jun 17, 2007 IP
  2. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #2
    I would have just parked it on to the new domain by cpanel. :D
     
    hasbehas, Jun 17, 2007 IP
  3. meamrussian

    meamrussian Active Member

    Messages:
    782
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #3
    What do you mean? How does this work? Can you please clarify?

    Thanks.
     
    meamrussian, Jun 17, 2007 IP
  4. hasbehas

    hasbehas Well-Known Member

    Messages:
    726
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    190
    #4
    on my hosting; cpanel there is an option "Park a domain" . You can park the unused domains on to some other domains.

    I give you an example. www.kusadasiproperty.biz is main domain with hosting account etc. www.kusadasirealestate.org is a domain that is parked on to kusadasiproperty.biz . See it for your self, you'll see what I mean.
     
    hasbehas, Jun 17, 2007 IP
  5. Maneel

    Maneel Peon

    Messages:
    753
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    0
    #5
    .htaccess would be a better solution
     
    Maneel, Jun 17, 2007 IP
  6. meamrussian

    meamrussian Active Member

    Messages:
    782
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #6
    Well, I tried parking the domain, but it's not working. I get the default "cpanel installed" page. And, for people trying to access specific files, such as index.php, they get a page not found error. What should I do? How do I do the htaccess thing?
     
    meamrussian, Jun 18, 2007 IP
  7. Boulder

    Boulder Well-Known Member

    Messages:
    806
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    118
    #7
    I believe you could use a 301 redirect to do that. Should be able to set it up in cPanel, I think it uses .htaccess to work as well. I have not set up a 301 myself, However have heard a lot about using them.

    You could also set up a redirect for that domain name, at the domain register (where ever your domain would be parked) you would set it up to redirect to what ever domain you wanted... with a record there!

    domain1[dot]com = redirects to = domain2[dot]com

    Boulder
     
    Boulder, Jun 18, 2007 IP
  8. meamrussian

    meamrussian Active Member

    Messages:
    782
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #8
    I tried doing domain forwarding from the registrar already, and it didn't work so well, and it took a long time to forward. Does anyone know the htaccess code to use to forward my whole domain to another? I know that it should look something like this:

    RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

    This one isn't entirely correct though. Can someone fix it please?
     
    meamrussian, Jun 18, 2007 IP
  9. meamrussian

    meamrussian Active Member

    Messages:
    782
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #9
    Ah, I just found the right code. I'll paste it here so other people can use it:

    Options +FollowSymLinks 
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^www.olddomain.com$
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^olddomain.com$
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
    Code (markup):
    Thanks, and I hope someone finds this useful!
     
    meamrussian, Jun 18, 2007 IP
  10. Boulder

    Boulder Well-Known Member

    Messages:
    806
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    118
    #10
    Yep, looks like your on to something now! (The 301) Good job! Tell me was the proper code found through cpanel, or by searching the web else where?

    Boulder
     
    Boulder, Jun 19, 2007 IP
  11. mpcovcd

    mpcovcd Peon

    Messages:
    280
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Go into your cpanel and forward the domain, or go into your registrar and forward your domain
     
    mpcovcd, Jun 19, 2007 IP