Подкиньте php скрипт редиректа

Discussion in 'Болталка' started by [FREE], 4 Mar 2010.

  1. [FREE]

    [FREE] Member

    Joined:
    1 Nov 2008
    Messages:
    0
    Likes Received:
    55
    Reputations:
    0
    Нужен самый обычный скрипт редиректа на пхп, подкиньте буду благодарен
     
  2. Nelzone

    Nelzone Banned

    Joined:
    12 Apr 2008
    Messages:
    172
    Likes Received:
    134
    Reputations:
    6
    тебе в другой раздел

    PHP:
    <?php
    <html>
    header('Location: http://www.example.com/');
    ?>
     
    #2 Nelzone, 4 Mar 2010
    Last edited: 4 Mar 2010
  3. emillord

    emillord Elder - Старейшина

    Joined:
    20 Jan 2008
    Messages:
    257
    Likes Received:
    443
    Reputations:
    255
    Code:
    <?
    $URL="http://www.new.site/page.html";
    header ("Location: $URL");
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <script language="JavaScript1.1" type="text/javascript">
    <!--
    location.replace("http://www.new.site/page.html"); 
    //-->
    </script>
    <noscript>
    <meta http-equiv="Refresh" content="0; URL=http://www.new.site/page.html"> 
    </noscript>
    </head>
    <body>
    Мы перебрались на <a href="http://www.new.site/page.html">новое местечко</a>.
    </body>
    </html>
    пойдёт?
     
  4. Kusto

    Kusto Elder - Старейшина

    Joined:
    4 Feb 2007
    Messages:
    886
    Likes Received:
    678
    Reputations:
    510
    <?php
    echo "<html><head><META HTTP-EQUIV='Refresh' content ='0; URL=http://http://www.example.com</html>";
    ?>
    как вариант))
     
  5. [FREE]

    [FREE] Member

    Joined:
    1 Nov 2008
    Messages:
    0
    Likes Received:
    55
    Reputations:
    0
    emillord спасибо воспользовался
     
  6. starbes

    starbes Member

    Joined:
    12 Feb 2010
    Messages:
    0
    Likes Received:
    6
    Reputations:
    10
    Я пользуюсь этим:

    <?php $URL="http://";
    header("Location:$URL");
    exit();
    ?>