how to redirect a webpage in php

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mynick
    New Member
    • Jan 2007
    • 4

    how to redirect a webpage in php

    how to redirect a webpage in php
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    [PHP]<?php
    header('Locatio n: http://www.yoursite.co m/yourpage.php') ;
    ?>[/PHP]
    This must appear before anything else on the page otherwise the redirect will not work.

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      I hope you mean 'any headers' or 'any output'.

      Ronald :cool:

      Comment

      • NSR
        New Member
        • Jan 2007
        • 2

        #4
        I hope u meet ur requirement by this....


        header("Locatio n: ./to the page u like to ridirect");

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          Originally posted by ronverdonk
          I hope you mean 'any headers' or 'any output'.

          Ronald :cool:
          Yes, that's more precise.

          Comment

          • tathagata
            New Member
            • Nov 2006
            • 6

            #6
            if you want redirect the page in your project then
            <?php
            header("locatio n:yourpage.php" );
            ?>

            if you want redirect the page in another project then just put the url like

            <?php
            header("locatio n:http://www.yoursite.co m/yourpage.php");
            ?>

            Comment

            • ozgur uksal
              New Member
              • Jan 2007
              • 2

              #7
              f

              You can find everything you need at


              good luck
              ozgur uksal
              Last edited by ozgur uksal; Jan 18 '07, 08:16 AM. Reason: f

              Comment

              Working...