How To Make Redirect Page With PHP

Discussion in 'Programming' started by vannarith, Mar 18, 2010.

  1. #1
    Hello :)
    I am not professional in php script and i want to create one page of redirect people to our new design pages. It works same like tinyurl.com but it is abit different that it will lead the people to our wanted page for 15 seconds first before it leads to the destination page. Could any php professional in this field help me to code out or if you think it is a bit hard i will pay you.

    Waiting for help!!!!
     
    vannarith, Mar 18, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    You have to do it by javascript, not by php.
     
    s_ruben, Mar 18, 2010 IP
  3. rockjone

    rockjone Peon

    Messages:
    358
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Create a php file and replace the following with your actual URL

    <?php
    header( 'Location: http://domain.com) ;
    ?>
     
    rockjone, Mar 18, 2010 IP
  4. guardian999

    guardian999 Well-Known Member

    Messages:
    376
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    103
    #4
    you can use setTimeout or meta tag refresh
     
    guardian999, Mar 18, 2010 IP
  5. sparkar17

    sparkar17 Member

    Messages:
    51
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Actually there are two ways in PHP to redirect the page

    1. header('Location : other_page.php');
    2. echo "<script>location.href='other_page.php';</script>";
     
    sparkar17, Mar 18, 2010 IP
  6. jijieyz

    jijieyz Guest

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    <?php
    header( 'Location: blabla.com) ;
    ?>
     
    jijieyz, Mar 26, 2010 IP
  7. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #7
    And how it can be done with php? It cannot be used php function "header", it has to be done by javascript!
     
    s_ruben, Mar 26, 2010 IP
  8. SeoKungFu

    SeoKungFu Active Member

    Messages:
    206
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #8
    All of you that advise about the header : I think you're skipping one very important detail - from SEO perspective - detail.
    The header can and should include the HTTP status code. You cannot rely on the fact that the implementation of the PHP interpreter that you're using makes it underneath.
    And although there have been rumors that google is deluting pagerank passed via 301's it's still the best option, compared to 302's etc.
     
    Last edited: Mar 26, 2010
    SeoKungFu, Mar 26, 2010 IP
  9. Vontage

    Vontage Peon

    Messages:
    141
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It wont be a "real" 301 if you don't use PHP (or any other server side).
    If you use just javascript or xHTML, it wont help at all with SEO.
     
    Vontage, Mar 26, 2010 IP