HTTP 状态(Status) 301 和 302 ? PHP 程序要怎么写

HTTP 301 范例(PHP)


<?php
header('HTTP/1.1 301 Moved Permanently');
header('Location: http://plog.longwin.com.tw/');
exit;
?>

HTTP 302 范例(PHP)


<?php
header("Location: http://plog.longwin.com.tw/");
exit;
?>

原文地址:https://www.cnblogs.com/mylele/p/3303440.html