Site redirect script?

Discussion in 'PHP' started by satishtalim, Jun 7, 2007.

  1. #1
    satishtalim, Jun 7, 2007 IP
  2. ashish1987

    ashish1987 Well-Known Member

    Messages:
    824
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    110
    #2
    You can use your control panel in rubystudynotes.com to redirect or else add a page there which would redirect you to the other domain.I can do it for you. PM me if you wish.
     
    ashish1987, Jun 7, 2007 IP
  3. BLaZeR

    BLaZeR Peon

    Messages:
    1,567
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Put this in the index php file. Rename the site.com of course.
    <?
    header("Location: http://www.site.com");
    ?>
     
    BLaZeR, Jun 7, 2007 IP
  4. satishtalim

    satishtalim Peon

    Messages:
    440
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks. I used the control panel to do it.
     
    satishtalim, Jun 7, 2007 IP
  5. donteatchicken

    donteatchicken Well-Known Member

    Messages:
    432
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    118
    #5
    Using control panel may not be a good idea, now you have 2 domains with duplicate content.. google will penalize you for that in about 6 months..

    i'd use a meta refresh

    <meta http-equiv="refresh" content="2;url=http://destinationurl.com">
    Code (markup):
    See the "2"? Thats how many seconds it will will wait before redirecting the end user.. enough time for them to read "Loading....." or "Redirecting to our new site, please wait" text.. you can alter the seconds as well..

    Put the code anywhere in the page (html)

    If it's php use:

    echo "<meta http-equiv='refresh' content='2;url=http://destinationurl.com'>";
    
    
    Code (markup):
     
    donteatchicken, Jun 8, 2007 IP