The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permenant redirect....

Discussion in 'General Discussion' started by Devil Inside, Jul 3, 2004.

  1. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    I have a client who is trying to setup a perm. redirect for his main account domain. However, this affects his addon domains as well.

    I then instructed him to try setting up a perm redirect for the index.html file within his main domain. I figured this would then leave the rest of the site alone.

    It still messed everything up.

    How can he redirect only his main domain to a new domain - and with the 301 code so that it is search engine friendly?
     
  2. Sheldon

    Sheldon Well-Known Member

    Joined:
    Jun 7, 2004
    Messages:
    378
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Canada
    use the php header function

    and throw that in the root public_html folder.

    it will leave his addon domains alone.. however if he has any parked domains they will be affected as well..

    there are 2 alternatives.. use a .htaccess file to check for which domain they are going to/coming from

    OR

    use a php script to do basically the same and redirect them accordingly
     
  3. Devil Inside

    Devil Inside Well-Known Member

    Joined:
    Apr 4, 2003
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    16
    I thought that would come off as an 302 temp. redirect...

    *edit*
    Confirmed, php redir. would appear as a 302 temp.

    Which is not what he wants for search engines to see. He needs a 301.
     
    #3 Devil Inside, Jul 4, 2004
    Last edited: Jul 4, 2004
Loading...

Share This Page