1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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
    SEMrush
     
    qll, Sep 17, 2004 IP
    SEMrush
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,283
    Likes Received:
    2,599
    Best Answers:
    460
    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