{"id":575,"date":"2010-12-16T12:25:20","date_gmt":"2010-12-16T12:25:20","guid":{"rendered":""},"modified":"2011-10-14T16:36:11","modified_gmt":"2011-10-14T08:36:11","slug":"575","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=575","title":{"rendered":"Apache Rewrite \u89c4\u5219\u8be6\u89e3"},"content":{"rendered":"<p>1\u3001Rewrite\u89c4\u5219\u7b80\u4ecb\uff1a<\/p>\n<p>Rewirte\u4e3b\u8981\u7684\u529f\u80fd\u5c31\u662f\u5b9e\u73b0URL\u7684\u8df3\u8f6c\uff0c\u5b83\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u57fa\u4e8ePerl\u8bed\u8a00\u3002\u53ef\u57fa\u4e8e\u670d\u52a1\u5668\u7ea7\u7684(httpd.conf)\u548c\u76ee\u5f55\u7ea7\u7684 (.htaccess)\u4e24\u79cd\u65b9\u5f0f\u3002\u5982\u679c\u8981\u60f3\u7528\u5230rewrite\u6a21\u5757\uff0c\u5fc5\u987b\u5148\u5b89\u88c5\u6216\u52a0\u8f7drewrite\u6a21\u5757\u3002\u65b9\u6cd5\u6709\u4e24\u79cd\u4e00\u79cd\u662f\u7f16\u8bd1apache\u7684\u65f6\u5019\u5c31\u76f4\u63a5 \u5b89\u88c5rewrite\u6a21\u5757\uff0c\u522b\u4e00\u79cd\u662f\u7f16\u8bd1apache\u65f6\u4ee5DSO\u6a21\u5f0f\u5b89\u88c5apache,\u7136\u540e\u518d\u5229\u7528\u6e90\u7801\u548capxs\u6765\u5b89\u88c5rewrite\u6a21\u5757\u3002<\/p>\n<p>\u57fa\u4e8e\u670d\u52a1\u5668\u7ea7\u7684(httpd.conf)\u6709\u4e24\u79cd\u65b9\u6cd5\uff0c\u4e00\u79cd\u662f\u5728httpd.conf\u7684\u5168\u5c40\u4e0b \u76f4\u63a5\u5229\u7528RewriteEngine on\u6765\u6253\u5f00rewrite\u529f\u80fd;\u53e6\u4e00\u79cd\u662f\u5728\u5c40\u90e8\u91cc\u5229\u7528RewriteEngine on\u6765\u6253\u5f00rewrite\u529f\u80fd,\u4e0b\u9762\u5c06\u4f1a\u4e3e\u4f8b\u8bf4\u660e\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f,\u5fc5\u987b\u5728\u6bcf\u4e2avirtualhost\u91cc\u7528RewriteEngine on\u6765\u6253\u5f00rewrite\u529f\u80fd\u3002\u5426\u5219virtualhost\u91cc\u6ca1\u6709RewriteEngine on\u5b83\u91cc\u9762\u7684\u89c4\u5219\u4e5f\u4e0d\u4f1a\u751f\u6548\u3002<br \/>\n<!--more--><br \/>\n\u57fa\u4e8e\u76ee\u5f55\u7ea7\u7684(.htaccess),\u8981\u6ce8\u610f\u4e00\u70b9\u90a3\u5c31\u662f\u5fc5\u987b\u6253\u5f00\u6b64\u76ee\u5f55\u7684FollowSymLinks\u5c5e\u6027\u4e14\u5728.htaccess\u91cc\u8981\u58f0\u660eRewriteEngine on\u3002<\/p>\n<p>2\u3001\u4e3e\u4f8b\u8bf4\u660e\uff1a<\/p>\n<p>\u4e0b\u9762\u662f\u5728\u4e00\u4e2a\u865a\u62df\u4e3b\u673a\u91cc\u5b9a\u4e49\u7684\u89c4\u5219\u3002\u529f\u80fd\u662f\u628aclient\u8bf7\u6c42\u7684\u4e3b\u673a\u524d\u7f00\u4e0d\u662fwww.colorme.com\u548c203.81.23.202\u90fd\u8df3\u8f6c\u5230 \u4e3b\u673a\u524d\u7f00\u4e3a<a href=\"http:\/\/www.colorme.com.cn\" rel=\"external\" target=\"_blank\">http:\/\/www.colorme.com.cn<\/a>\uff0c\u907f\u514d\u5f53\u7528\u6237\u5728\u5730\u5740\u680f\u5199\u5165<a href=\"http:\/\/colorme.com.cn\" rel=\"external\" target=\"_blank\">http:\/\/colorme.com.cn<\/a>\u65f6\u4e0d\u80fd\u4ee5\u4f1a\u5458\u65b9\u5f0f\u767b \u5f55\u7f51\u7ad9\u3002<\/p>\n<p>NameVirtualHost 192.168.100.8:80<\/p>\n<p>ServerAdmin webmaster@colorme.com.cn<br \/>\nDocumentRoot \u201c\/web\/webapp\u201d<br \/>\nServerName www.colorme.com.cn<br \/>\nServerName colorme.com.cn<br \/>\nRewriteEngine on #\u6253\u5f00rewirte\u529f\u80fd<br \/>\nRewriteCond %{HTTP_HOST} !^www.colorme.com.cn [NC] #\u58f0\u660eClient\u8bf7\u6c42\u7684\u4e3b\u673a\u4e2d\u524d\u7f00\u4e0d\u662fwww.colorme.com.cn,[NC]\u7684\u610f\u601d\u662f\u5ffd\u7565\u5927\u5c0f\u5199<br \/>\nRewriteCond %{HTTP_HOST} !^203.81.23.202 [NC] #\u58f0\u660eClient\u8bf7\u6c42\u7684\u4e3b\u673a\u4e2d\u524d\u7f00\u4e0d\u662f203.81.23.202,[NC]\u7684\u610f\u601d\u662f\u5ffd\u7565\u5927\u5c0f\u5199<br \/>\nRewriteCond %{HTTP_HOST} !^$ #\u58f0\u660eClient\u8bf7\u6c42\u7684\u4e3b\u673a\u4e2d\u524d\u7f00\u4e0d\u4e3a\u7a7a,[NC]\u7684\u610f\u601d\u662f\u5ffd\u7565\u5927\u5c0f\u5199<br \/>\nRewriteRule ^\/(.*) <a href=\"http:\/\/www.colorme.com.cn\/\" rel=\"external\" target=\"_blank\">http:\/\/www.colorme.com.cn\/<\/a> [L]<br \/>\n#\u542b\u4e49\u662f\u5982\u679cClient\u8bf7\u6c42\u7684\u4e3b\u673a\u4e2d\u7684\u524d\u7f00\u7b26\u5408\u4e0a\u8ff0\u6761\u4ef6\uff0c\u5219\u76f4\u63a5\u8fdb\u884c\u8df3\u8f6c\u5230<a href=\"http:\/\/www.colorme.com.cn\/\" rel=\"external\" target=\"_blank\">http:\/\/www.colorme.com.cn\/<\/a>,[L]\u610f\u5473\u7740\u7acb\u5373\u505c \u6b62\u91cd\u5199\u64cd\u4f5c\uff0c\u5e76\u4e0d\u518d\u5e94\u7528\u5176\u4ed6\u91cd\u5199\u89c4\u5219\u3002\u8fd9\u91cc\u7684.*\u662f\u6307\u5339\u914d\u6240\u6709URL\u4e2d\u4e0d\u5305\u542b\u6362\u884c\u5b57\u7b26\uff0c()\u62ec\u53f7\u7684\u529f\u80fd\u662f\u628a\u6240\u6709\u7684\u5b57\u7b26\u505a\u4e00\u4e2a\u6807\u8bb0\uff0c\u4ee5\u4fbf\u4e8e\u540e\u9762\u7684\u5e94\u7528.\u5c31\u662f \u5f15\u7528\u524d\u9762\u91cc\u7684(.*)\u5b57\u7b26\u3002<br \/>\n\u4f8b\u4e8c.\u5c06\u8f93\u5165 folio.test.com \u7684\u57df\u540d\u65f6\u8df3\u8f6c\u5230profile.test.com<\/p>\n<p>listen 8080<br \/>\nNameVirtualHost 10.122.89.106:8080<br \/>\nServerAdmin webmaster@colorme.com.cn<br \/>\nDocumentRoot \u201c\/usr\/local\/www\/apache22\/data1\/\u201d<br \/>\nServerName profile.test.com<br \/>\nRewriteEngine on<br \/>\nRewriteCond %{HTTP_HOST} ^folio.test.com [NC]<br \/>\nRewriteRule ^\/(.*) <a href=\"http:\/\/profile.test.com\/\" rel=\"external\" target=\"_blank\">http:\/\/profile.test.com\/<\/a> [L]<\/p>\n<p>3.Apache mod_rewrite\u89c4\u5219\u91cd\u5199\u7684\u6807\u5fd7\u4e00\u89c8<\/p>\n<p>1) R[=code](force redirect) \u5f3a\u5236\u5916\u90e8\u91cd\u5b9a\u5411<br \/>\n\u5f3a\u5236\u5728\u66ff\u4ee3\u5b57\u7b26\u4e32\u52a0\u4e0a<a href=\"http:\/\/thishost\" rel=\"external\" target=\"_blank\">http:\/\/thishost<\/a>[:thisport]\/\u524d\u7f00\u91cd\u5b9a\u5411\u5230\u5916\u90e8\u7684URL.\u5982\u679ccode\u4e0d\u6307\u5b9a\uff0c\u5c06\u7528\u7f3a\u7701\u7684302 HTTP\u72b6\u6001\u7801\u3002<br \/>\n2) F(force URL to be forbidden)\u7981\u7528URL,\u8fd4\u56de403HTTP\u72b6\u6001\u7801\u3002<br \/>\n3) G(force URL to be gone) \u5f3a\u5236URL\u4e3aGONE\uff0c\u8fd4\u56de410HTTP\u72b6\u6001\u7801\u3002<br \/>\n4) P(force proxy) \u5f3a\u5236\u4f7f\u7528\u4ee3\u7406\u8f6c\u53d1\u3002<br \/>\n5) L(last rule) \u8868\u660e\u5f53\u524d\u89c4\u5219\u662f\u6700\u540e\u4e00\u6761\u89c4\u5219\uff0c\u505c\u6b62\u5206\u6790\u4ee5\u540e\u89c4\u5219\u7684\u91cd\u5199\u3002<br \/>\n6) N(next round) \u91cd\u65b0\u4ece\u7b2c\u4e00\u6761\u89c4\u5219\u5f00\u59cb\u8fd0\u884c\u91cd\u5199\u8fc7\u7a0b\u3002<br \/>\n7) C(chained with next rule) \u4e0e\u4e0b\u4e00\u6761\u89c4\u5219\u5173\u8054<\/p>\n<p>\u5982\u679c\u89c4\u5219\u5339\u914d\u5219\u6b63\u5e38\u5904\u7406\uff0c\u8be5\u6807\u5fd7\u65e0\u6548\uff0c\u5982\u679c\u4e0d\u5339\u914d\uff0c\u90a3\u4e48\u4e0b\u9762\u6240\u6709\u5173\u8054\u7684\u89c4\u5219\u90fd\u8df3\u8fc7\u3002<br \/>\n8) T=MIME-type(force MIME type) \u5f3a\u5236MIME\u7c7b\u578b<br \/>\n9) NS (used only if no internal sub-request) \u53ea\u7528\u4e8e\u4e0d\u662f\u5185\u90e8\u5b50\u8bf7\u6c42<br \/>\n10) NC(no case) \u4e0d\u533a\u5206\u5927\u5c0f\u5199<br \/>\n11) QSA(query string append) \u8ffd\u52a0\u8bf7\u6c42\u5b57\u7b26\u4e32<br \/>\n12) NE(no URI escaping of output) \u4e0d\u5728\u8f93\u51fa\u8f6c\u4e49\u7279\u6b8a\u5b57\u7b26<br \/>\n\u4f8b\u5982\uff1aRewriteRule \/foo\/(.*) \/bar?arg=P1\\%3d$1 [R,NE] \u5c06\u80fd\u6b63\u786e\u7684\u5c06\/foo\/zoo\u8f6c\u6362\u6210\/bar?arg=P1=zed<br \/>\n13) PT(pass through to next handler) \u4f20\u9012\u7ed9\u4e0b\u4e00\u4e2a\u5904\u7406<br \/>\n\u4f8b\u5982\uff1a<br \/>\nRewriteRule ^\/abc(.*) \/def$1 [PT] # \u5c06\u4f1a\u4ea4\u7ed9\/def\u89c4\u5219\u5904\u7406<br \/>\nAlias \/def \/ghi<br \/>\n14) S=num(skip next rule(s)) \u8df3\u8fc7num\u6761\u89c4\u5219<br \/>\n15) E=VAR:VAL(set environment variable) \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<p>4.Apache rewrite\u4f8b\u5b50\u96c6\u5408<\/p>\n<p>\u5728 httpd \u4e2d\u5c06\u4e00\u4e2a\u57df\u540d\u8f6c\u53d1\u5230\u53e6\u4e00\u4e2a\u57df\u540d\u865a\u62df\u4e3b\u673a\u4e16\u754c\u8fd1\u671f\u66f4\u6362\u4e86\u57df\u540d\uff0c\u65b0\u57df\u540d\u4e3a www.wbhw.com, \u66f4\u52a0\u7b80\u77ed\u597d\u8bb0\u3002\u8fd9\u65f6\u9700\u8981\u5c06\u539f\u6765\u7684\u57df\u540dwebhosting-world.com, \u4ee5\u53ca\u8bba\u575b\u6240\u5728\u5730\u5740 webhosting-world.com\/forums\/\u5b9a\u5411\u5230\u65b0\u7684\u57df\u540d\uff0c\u4ee5\u4fbf\u7528\u6237\u53ef\u4ee5\u627e\u5230\uff0c\u5e76\u4e14\u4f7f\u539f\u6765\u7684\u8bba\u575b URL \u7ee7\u7eed\u6709\u6548\u800c\u4e0d\u51fa\u73b0 404 \u672a\u627e\u5230\uff0c\u6bd4\u5982\u539f\u6765\u7684<a href=\"http:\/\/www.webhosting-world.com\/forums\/-f60.html\" rel=\"external\" target=\"_blank\">http:\/\/www.webhosting-world.com\/forums\/-f60.html<\/a>, \u8ba9\u5b83\u5728\u65b0\u7684\u57df\u540d\u4e0b\u7ee7\u7eed\u6709\u6548\uff0c\u70b9\u51fb\u540e\u8f6c\u53d1\u5230<a href=\"http:\/\/bbs.wbhw.com\/-f60.html\" rel=\"external\" target=\"_blank\">http:\/\/bbs.wbhw.com\/-f60.html<\/a>, \u8fd9\u5c31\u9700\u8981\u7528 apache \u7684 Mod_rewrite \u529f\u80fd\u6765\u5b9e\u73b0\u3002<\/p>\n<p>\u5728\u4e2d\u6dfb\u52a0\u4e0b\u9762\u7684\u91cd\u5b9a\u5411\u89c4\u5219\uff1a<\/p>\n<p>RewriteEngine On<br \/>\n# Redirect webhosting-world.com\/forums to bbs.wbhw.com<br \/>\nRewriteCond %{REQUEST_URI} ^\/forums\/<br \/>\nRewriteRule \/forums\/(.*) <a href=\"http:\/\/bbs.wbhw.com\/\" rel=\"external\" target=\"_blank\">http:\/\/bbs.wbhw.com\/<\/a>$1 [R=permanent,L]<br \/>\n# Redirect webhosting-world.com to wbhw.com<br \/>\nRewriteCond %{REQUEST_URI} !^\/forums\/<br \/>\nRewriteRule \/(.*) <a href=\"http:\/\/www.wbhw.com\/\" rel=\"external\" target=\"_blank\">http:\/\/www.wbhw.com\/<\/a>$1 [R=permanent,L]<\/p>\n<p>\u6dfb\u52a0\u4e86\u4e0a\u9762\u7684\u89c4\u5219\u4ee5\u540e\uff0c \u91cc\u7684\u5168\u90e8\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<p>ServerAlias webhosting-world.com<br \/>\nServerAdmin admin@webhosting-world.com<br \/>\nDocumentRoot \/path\/to\/webhosting-world\/root<br \/>\nServerName www.webhosting-world.com<br \/>\nRewriteEngine On<br \/>\n# Redirect webhosting-world.com\/forums to bbs.wbhw.com<br \/>\nRewriteCond %{REQUEST_URI} ^\/forums\/<br \/>\nRewriteRule \/forums\/(.*) <a href=\"http:\/\/bbs.wbhw.com\/\" rel=\"external\" target=\"_blank\">http:\/\/bbs.wbhw.com\/<\/a>$1 [R=permanent,L]<br \/>\n# Redirect webhosting-world.com to wbhw.com<br \/>\nRewriteCond %{REQUEST_URI} !^\/forums\/<br \/>\nRewriteRule \/(.*) <a href=\"http:\/\/www.wbhw.com\/\" rel=\"external\" target=\"_blank\">http:\/\/www.wbhw.com\/<\/a>$1 [R=permanent,L]<\/p>\n<p>URL\u91cd\u5b9a\u5411<\/p>\n<p>\u4f8b\u5b50\u4e00:<\/p>\n<p>1.<a href=\"http:\/\/www.zzz.com\/xxx.php-\" rel=\"external\" target=\"_blank\">http:\/\/www.zzz.com\/xxx.php-<\/a>&gt; <a href=\"http:\/\/www.zzz.com\/xxx\/\" rel=\"external\" target=\"_blank\">http:\/\/www.zzz.com\/xxx\/<\/a><br \/>\n2.<a href=\"http:\/\/yyy.zzz.com-\" rel=\"external\" target=\"_blank\">http:\/\/yyy.zzz.com-<\/a>&gt; <a href=\"http:\/\/www.zzz.com\/user.php?username=yyy\" rel=\"external\" target=\"_blank\">http:\/\/www.zzz.com\/user.php?username=yyy<\/a> \u7684\u529f\u80fd<br \/>\nRewriteEngine On<br \/>\nRewriteCond %{HTTP_HOST} ^www.zzz.com<br \/>\nRewriteCond %{REQUEST_URI} !^user.php$<br \/>\nRewriteCond %{REQUEST_URI} .php$<br \/>\nRewriteRule (.*).php$ <a href=\"http:\/\/www.zzz.com\/\" rel=\"external\" target=\"_blank\">http:\/\/www.zzz.com\/<\/a>$1\/ [R]<br \/>\nRewriteCond %{HTTP_HOST} !^www.zzz.com<br \/>\nRewriteRule ^(.+) %{HTTP_HOST} [C]<br \/>\nRewriteRule ^([^.]+).zzz.com <a href=\"http:\/\/www.zzz.com\/user.php?username=\" rel=\"external\" target=\"_blank\">http:\/\/www.zzz.com\/user.php?username=<\/a>$1<\/p>\n<p>\u4f8b\u5b50\u4e8c\uff1a<\/p>\n<p>\/type.php?typeid=*\u00a0\u00a0 \u2013&gt; \/type*.html<br \/>\n\/type.php?typeid=*&amp;page=*\u00a0\u00a0 \u2013&gt; \/type*page*.html<br \/>\nRewriteRule ^\/type([0-9]+).html$ \/type.php?typeid=$1 [PT]<br \/>\nRewriteRule ^\/type([0-9]+)page([0-9]+).html$ \/type.php?typeid=$1&amp;page=$2 [PT]<\/p>\n<p>5.\u4f7f\u7528Apache\u7684URL Rewrite\u914d\u7f6e\u591a\u7528\u6237\u865a\u62df\u670d\u52a1\u5668<\/p>\n<p>\u8981\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\uff0c\u9996\u5148\u8981\u5728DNS\u670d\u52a1\u5668\u4e0a\u6253\u5f00\u57df\u540d\u7684\u6cdb\u57df\u540d\u89e3\u6790\uff08\u81ea\u5df1\u505a\u6216\u8005\u627e\u57df\u540d\u670d\u52a1\u5546\u505a\uff09\u3002\u6bd4\u5982\uff0c\u6211\u5c31\u628a *.semcase.com\u548c *.semcase.cn\u5168\u90e8\u89e3\u6790\u5230\u4e86\u6211\u7684\u8fd9\u53f0Linux Server\u4e0a\u3002<\/p>\n<p>\u7136\u540e\uff0c\u770b\u4e00\u4e0b\u6211\u7684Apache\u4e2d\u5173\u4e8e*.semcase.com\u7684\u865a\u62df\u4e3b\u673a\u7684\u8bbe\u5b9a\u3002<\/p>\n<p>#*.com,*.osall.net<\/p>\n<p>ServerAdmin webmaster@semcase.com<br \/>\nDocumentRoot \/home\/www\/www.semcase.com<br \/>\nServerName dns.semcase.com<br \/>\nServerAlias dns.semcase.com semcase.com semcase.net *.semcase.com *.semcase.net<br \/>\nCustomLog \/var\/log\/httpd\/osa\/access_log.log\u201d common<br \/>\nErrorLog \/var\/log\/httpd\/osa\/error_log.log\u201d<br \/>\nAllowOverride None<br \/>\norder deny,allow<br \/>\n#AddDefaultCharset GB2312<\/p>\n<p>RewriteEngine on<br \/>\nRewriteCond %{HTTP_HOST}\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0^[^.]+.osall.(com|net)$<br \/>\nRewriteRule ^(.+)\u00a0\u00a0\u00a0\u00a0 %{HTTP_HOST}$1\u00a0\u00a0 [C]<br \/>\nRewriteRule ^([^.]+).osall.(com|net)(.*)$<br \/>\n\/home\/www\/www.semcase.com\/sylvan$3?un=$1&amp;%{QUERY_STRING} [L]<br \/>\n\u5728\u8fd9\u6bb5\u8bbe\u5b9a\u4e2d\uff0c\u6211\u628a*.semcase.net\u548c*.semcase.com \u7684Document Root\u90fd\u8bbe\u5b9a\u5230\u4e86 \/home\/www\/www.semcase.com<\/p>\n<p>\u4f46\u662f\uff0c\u7ee7\u7eed\u770b\u4e0b\u53bb\uff0c\u770b\u5230\u2026\u914d\u7f6e\u4e86\u5417\uff1f\u5728\u8fd9\u91cc\u6211\u5c31\u914d\u7f6e\u4e86URL Rewrite\u89c4\u5219\u3002<br \/>\nRewriteEngine on #\u6253\u5f00URL Rewrite\u529f\u80fd<br \/>\nRewriteCond %{HTTP_HOST} ^[^.]+.osall.(com|net)$ #\u5339\u914d\u6761\u4ef6\uff0c\u5982\u679c\u7528\u6237\u8f93\u5165\u7684URL\u4e2d\u4e3b\u673a\u540d\u662f\u7c7b\u4f3c xxxx.semcase.com \u6216\u8005 xxxx.semcase.cn \u5c31\u6267\u884c\u4e0b\u9762\u4e00\u53e5<br \/>\nRewriteRule ^(.+) %{HTTP_HOST}$1 [C] #\u628a\u7528\u6237\u8f93\u5165\u5b8c\u6574\u7684\u5730\u5740\uff08GET\u65b9\u5f0f\u7684\u53c2\u6570\u9664\u5916\uff09\u4f5c\u4e3a\u53c2\u6570\u4f20\u7ed9\u4e0b\u4e00\u4e2a\u89c4\u5219\uff0c[C]\u662fChain\u4e32\u8054\u4e0b\u4e00\u4e2a\u89c4\u5219\u7684\u610f\u601d<br \/>\nRewriteRule ^([^.]+).osall.(com|net)(.*)$ \/home\/www\/dev.semcase.com\/sylvan$3?un=$1&amp;%{QUERY_STRING} [L]<br \/>\n# \u6700\u5173\u952e\u7684\u662f\u8fd9\u4e00\u53e5\uff0c\u4f7f\u7528\u8bc1\u5219\u8868\u8fbe\u5f0f\u89e3\u6790\u7528\u6237\u8f93\u5165\u7684URL\u5730\u5740\uff0c\u628a\u4e3b\u673a\u540d\u4e2d\u7684\u7528\u6237\u540d\u4fe1\u606f\u4f5c\u4e3a\u540d\u4e3aun\u7684\u53c2\u6570\u4f20\u7ed9\/home\/www \/dev.semcase.com\u76ee\u5f55\u4e0b\u7684\u811a\u672c\uff0c\u5e76\u5728\u540e\u9762\u8ddf\u4e0a\u7528\u6237\u8f93\u5165\u7684GET\u65b9\u5f0f\u7684\u4f20\u5165\u53c2\u6570\u3002\u5e76\u6307\u660e\u8fd9\u662f\u6700\u540e\u4e00\u6761\u89c4\u5219\uff08[L]\u89c4\u5219\uff09\u3002\u6ce8\u610f\uff0c\u5728\u8fd9\u4e00\u53e5\u4e2d \u6307\u660e\u7684\u91cd\u5199\u540e\u7684\u5730\u5740\u7528\u7684\u662f\u670d\u52a1\u5668\u4e0a\u7684\u7edd\u5bf9\u8def\u5f84\uff0c\u8fd9\u662f\u5185\u90e8\u8df3\u8f6c\u3002\u5982\u679c\u4f7f\u7528<a href=\"http:\/\/xxxx\" rel=\"external\" target=\"_blank\">http:\/\/xxxx<\/a>\u8fd9\u6837\u7684URL\u683c\u5f0f\uff0c\u5219\u88ab\u79f0\u4e3a\u5916\u90e8\u8df3\u8f6c\u3002\u4f7f\u7528\u5916\u90e8\u8df3\u8f6c\u7684\u8bdd\uff0c\u6d4f \u89c8\u7740\u7684\u6d4f\u89c8\u5668\u4e2d\u7684URL\u5730\u5740\u4f1a\u6539\u53d8\u6210\u65b0\u7684\u5730\u5740\uff0c\u800c\u4f7f\u7528\u5185\u90e8\u8df3\u8f6c\u5219\u6d4f\u89c8\u5668\u4e2d\u7684\u5730\u5740\u4e0d\u53d1\u751f\u6539\u53d8\uff0c\u770b\u4e0a\u53bb\u66f4\u50cf\u5b9e\u9645\u7684\u4e8c\u7ea7\u57df\u540d\u865a\u62df\u670d\u52a1\u5668\u3002<\/p>\n<p>\u8fd9\u6837\u8bbe\u7f6e\u540e\uff0c\u91cd\u542fApache\u670d\u52a1\u5668\uff0c\u6d4b\u8bd5\u4e00\u4e0b\uff0c\u5c31\u5927\u529f\u544a\u6210\u4e86\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001Rewrite\u89c4\u5219\u7b80\u4ecb\uff1a Rewirte\u4e3b\u8981\u7684\u529f\u80fd\u5c31\u662f\u5b9e\u73b0URL&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-575","post","type-post","status-publish","format-standard","hentry","category-NetOS"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=575"}],"version-history":[{"count":1,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/575\/revisions"}],"predecessor-version":[{"id":742,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/575\/revisions\/742"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}