{"id":3645,"date":"2020-03-04T11:49:38","date_gmt":"2020-03-04T03:49:38","guid":{"rendered":"https:\/\/www.baishitou.cn\/?p=3645"},"modified":"2020-03-05T16:10:01","modified_gmt":"2020-03-05T08:10:01","slug":"apache-htaccess-301%e9%87%8d%e5%ae%9a%e5%90%91","status":"publish","type":"post","link":"https:\/\/www.baishitou.cn\/3645.html","title":{"rendered":"Apache htaccess 301\u91cd\u5b9a\u5411"},"content":{"rendered":"

 <\/p>\n

\"\"<\/a><\/p>\n

Apache\u73af\u5883\u4e0b.htaccess\u6587\u4ef6\u7684\u5199\u6cd5\uff0chttp301\u91cd\u5b9a\u5411\u5230https, \u4e0d\u5e26www\u7684\u7f51\u5740\u8df3\u8f6c\u5230\u5e26www\u7684\u7f51\u5740<\/p>\n

#\u5f00\u542f\u4f2a\u9759\u6001\r\nRewriteEngine On\r\n#http301\u91cd\u5b9a\u5411\u5230https, \u5e76\u4e14\u4e0d\u5e26www\u7684\u8df3\u8f6c\u5230\u5e26www\u7684\r\nRewriteCond %{HTTP_HOST} ^a.com<\/span> [NC]\r\nRewriteRule ^(.*)$ https:\/\/www.a.com<\/span>\/$1 [L,R=301]\r\nRewriteCond %{SERVER_PORT} 80\r\nRewriteRule ^(.*)$ https:\/\/www.a.com<\/span>\/$1 [L,R=301]<\/code><\/pre>\n

\u4e0a\u9762\u7ea2\u8272\u90e8\u5206\u66f4\u6539\u4e3a\u4f60\u7684\u57df\u540d\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

  Apache\u73af\u5883\u4e0b.htaccess\u6587\u4ef6\u7684\u5199\u6cd5\uff0chttp301\u91cd\u5b9a\u5411\u5230https, \u4e0d\u5e26www\u7684 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1178,1182,1183],"class_list":["post-3645","post","type-post","status-publish","format-standard","hentry","category-jiaocheng","tag-1178","tag-apache","tag-htaccess"],"_links":{"self":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/3645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/comments?post=3645"}],"version-history":[{"count":0,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/posts\/3645\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/media?parent=3645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/categories?post=3645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.baishitou.cn\/wp-json\/wp\/v2\/tags?post=3645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}