can't get 301 redirect to work!

Discussion in 'Site & Server Administration' started by Googles76, Jan 19, 2007.

  1. #1
    I bought a new domain and want to redirect the old domain to go to the new domain.

    My first question is, in cPanel, do I add the new domain as a "addon domain" or as a "parked domain"?

    in .htaccess I do 301 redirect / http://www.newdomain.com/

    The files for the new domain are the same as the old one, so there is no subfolders and all these files are in the root of my server. For some reason it is telling me that the redirect is invalid.

    Any ideas what I'm doing wrong?

    Thanks.
     
    Googles76, Jan 19, 2007 IP
  2. Googles76

    Googles76 Peon

    Messages:
    664
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    0
    #2
    hmm the problem seems that I can't redirect to pages of the same file name.

    For example I can redirect www.old.com/page1.htm to www.new.com/page2.htm

    but I can't do www.old.com/page1.htm to www.new.com/page1.htm.

    Any ideas why? The new.com is an addon domain setup on the same server.
     
    Googles76, Jan 19, 2007 IP
  3. bouncer69

    bouncer69 Peon

    Messages:
    978
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi

    It is very easy to do. May be you did something wrong. Follow this line

    RedirectMatch permanent ^/page1.htm$ http://www.new.com/page1.htm

    add this line in your .htaccess file.
     
    bouncer69, Jan 21, 2007 IP