Redirection help

Discussion in 'Site & Server Administration' started by Pandemix, Mar 8, 2008.

  1. #1
    Hi, I have never done this before so I am not sure what to do.

    I have just changed my URL on http://pandemixx.com/ to http://alexfraiser.com/.

    I set the redirection in cPanel to go from pandemixx.com to redirect to alexfraiser.com, and you see that works. However, sub pages on pandemixx.com show a 404 error. Example: http://pandemixx.com/about/

    What I want to know is how to make every page on my old domain redirect to my new domain instead of it showing a 404 on the page.

    Thanks anyone for the help!
     
    Pandemix, Mar 8, 2008 IP
  2. pipsbank

    pipsbank Banned

    Messages:
    1,187
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you do every page for the redirection or just a main domain?
    If using the cpanel you have to do to all pages if im not mistaken
     
    pipsbank, Mar 8, 2008 IP
  3. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    One domain should be the main domain and the other should be a "parked domain" in cPanel.

    In /public_html, your .htaccess should contain:
    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^alexfraiser.com$
    RewriteRule ^(.*)   http://alexfraiser.com//$1  [QSA,L,R=301]
    
    Code (markup):
    Jean-Luc
     
    Jean-Luc, Mar 8, 2008 IP
    Pandemix likes this.
  4. Pandemix

    Pandemix Well-Known Member

    Messages:
    954
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    120
    #4
    Thank you for the help Jean-Luc, this takes a load off my mind.
     
    Pandemix, Mar 8, 2008 IP