Does anyone how to write a 301 header in PHP/Perl?

Discussion in 'PHP' started by qll, Sep 17, 2004.

  1. #1
    I know how to do a 302. Simple write Location: newurl
    When I look at 301,
    2004-09-17 18:55:59.995 HTTP/1.1 301 Moved Permanently
    it is before
    2004-09-17 18:55:59.995 Date: Fri, 17 Sep 2004 22:56:27 GMT
    2004-09-17 18:55:59.995 Server: Apache/1.3.29 (Unix)
    I don't know how to control them as those are added by apache, not by Perl/PHP.

    I know how to do 301 in .htaccess, but I want to do it in Perl/PHP
     
    qll, Sep 17, 2004 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    <?php
    	header("HTTP/1.1 301 Moved Permanently");
    	header("Location: http://www.digitalpoint.com/");
    ?>
    PHP:
     
    digitalpoint, Sep 17, 2004 IP