{"id":624,"date":"2012-04-27T02:04:21","date_gmt":"2012-04-26T18:04:21","guid":{"rendered":"http:\/\/www.youthtribe.com\/?p=624"},"modified":"2012-04-27T02:04:21","modified_gmt":"2012-04-26T18:04:21","slug":"php%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e7%bd%91%e7%ab%99%e5%9f%9f%e5%90%8d301%e9%87%8d%e5%ae%9a%e5%90%91","status":"publish","type":"post","link":"http:\/\/www.youthtribe.com\/archives\/624","title":{"rendered":"php\u5982\u4f55\u5b9e\u73b0\u7f51\u7ad9\u57df\u540d301\u91cd\u5b9a\u5411"},"content":{"rendered":"

\u57df\u540d301\u91cd\u5b9a\u5411\u5728\u7f51\u7ad9\u57df\u540d\u8fdb\u884c\u53d8\u66f4\u65f6\uff0c\u6709\u7740\u975e\u5e38\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5b83\u53ef\u4ee5\u628a\u4e4b\u524d\u8001\u57df\u540d\u79ef\u7d2f\u4e0b\u6765\u7684\u6743\u91cd\u5f88\u597d\u7684\u4f20\u9012\u7ed9\u65b0\u7684\u57df\u540d\uff0c\u662fseo\u5fc5\u987b\u638c\u63e1\u7684\u4e00\u4e2a\u65b9\u6cd5\u3002\u4e0b\u8fb9\u5206\u4eab\u4e00\u4e0b\u5982\u4f55\u4f7f\u7528php\u4ee3\u7801\u5b9e\u73b0301\u91cd\u5b9a\u5411\u3002<\/p>\n

\u7ecf\u672c\u4eba\u68c0\u6d4b\u7f51\u7ad9\u72b6\u6001\u5b8c\u7f8e\u8fd4\u56de301\uff01php\u4ee3\u7801\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u8981\u628a\u6587\u4ef6\u547d\u540d\u6210index.php\u5c31\u597d\u4e86\uff01<\/p>\n

<?php
\n$HOST=$_SERVER[‘HTTP_HOST’];
\nif ($HOST==\u201dnbqq.net\u201d||\u201d\u8fd9\u91cc\u53ef\u4ee5\u52a0\u4e0a\u4f60\u8981\u91cd\u5b9a\u5411\u7684\u5176\u4ed6\u57df\u540d\u201d){
\nHeader(\u201cHTTP\/1.1 301 Moved Permanently\u201d);
\nHeader(\u201cLocation:http:\/\/www.nbqq.net\u201d);
\nexit();
\n}<\/p>\n

?><\/p>\n","protected":false},"excerpt":{"rendered":"

\u57df\u540d301\u91cd\u5b9a\u5411\u5728\u7f51\u7ad9\u57df\u540d\u8fdb\u884c\u53d8\u66f4\u65f6\uff0c\u6709\u7740\u975e\u5e38\u91cd\u8981\u7684\u4f5c\u7528\u3002\u5b83\u53ef\u4ee5\u628a\u4e4b\u524d\u8001\u57df\u540d\u79ef\u7d2f\u4e0b\u6765\u7684\u6743\u91cd\u5f88\u597d\u7684\u4f20\u9012\u7ed9\u65b0\u7684\u57df\u540d\uff0c\u662fseo\u5fc5\u987b\u638c\u63e1\u7684\u4e00\u4e2a\u65b9\u6cd5\u3002\u4e0b\u8fb9\u5206\u4eab\u4e00\u4e0b\u5982\u4f55\u4f7f\u7528php\u4ee3\u7801\u5b9e\u73b0301\u91cd\u5b9a\u5411\u3002 \u7ecf\u672c\u4eba\u68c0\u6d4b\u7f51\u7ad9\u72b6\u6001\u5b8c\u7f8e\u8fd4\u56de301\uff01php\u4ee3\u7801\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u8981\u628a\u6587\u4ef6\u547d\u540d\u6210index.php\u5c31\u597d\u4e86\uff01 <?php $HOST=$_SERVER[‘HTTP_HOST’]; if ($HOST==\u201dnbqq.net\u201d||\u201d\u8fd9\u91cc\u53ef\u4ee5\u52a0\u4e0a\u4f60\u8981\u91cd\u5b9a\u5411\u7684\u5176\u4ed6\u57df\u540d\u201d){ Header(\u201cHTTP\/1.1 301 Moved Permanently\u201d); Header(\u201cLocation:ht<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,9],"tags":[96],"_links":{"self":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/624"}],"collection":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/comments?post=624"}],"version-history":[{"count":2,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/624\/revisions"}],"predecessor-version":[{"id":626,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/posts\/624\/revisions\/626"}],"wp:attachment":[{"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/media?parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/categories?post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.youthtribe.com\/wp-json\/wp\/v2\/tags?post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}