{"id":76,"date":"2009-06-18T16:25:42","date_gmt":"2009-06-18T07:25:42","guid":{"rendered":"http:\/\/www.zontheworld.com\/blog\/?p=76"},"modified":"2009-08-07T10:58:36","modified_gmt":"2009-08-07T01:58:36","slug":"%e3%83%a1%e3%83%b3%e3%83%86%e3%83%8a%e3%83%b3%e3%82%b9%e4%b8%ad%e7%94%bb%e9%9d%a2%e3%82%92%e5%87%ba%e3%81%99%e6%ad%a3%e3%81%97%e3%81%84%e4%bd%9c%e6%b3%95%e3%81%a8htaccess%e3%81%ae%e6%9b%b8%e3%81%8d","status":"publish","type":"post","link":"https:\/\/www.zontheworld.com\/blog\/archives\/76","title":{"rendered":"\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d\u753b\u9762\u3092\u51fa\u3059\u6b63\u3057\u3044\u4f5c\u6cd5\u3068.htaccess\u306e\u66f8\u304d\u65b9\u306e\u6ce8\u610f\u70b9"},"content":{"rendered":"<p>WordPress \u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3092\u3059\u308b\u305f\u3081\u306b\u3001\u3061\u3087\u3046\u3069\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3066\u304a\u3044\u305f <a href=\"http:\/\/web-tan.forum.impressrd.jp\/e\/2009\/06\/16\/5880\" class=\"note\">\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d\u753b\u9762\u3092\u51fa\u3059\u6b63\u3057\u3044\u4f5c\u6cd5\u3068.htaccess\u306e\u66f8\u304d\u65b9 | Web\u62c5\u5f53\u8005Forum<\/a> \u3092\u53c2\u8003\u306b\u3057\u3066\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u3092\u51fa\u305d\u3046\u3068\u3057\u305f\u3089\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u304c\u51fa\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u53c2\u8003\u306b\u3057\u305f .htaccess \u306e\u66f8\u304d\u65b9\u306f\u4e0b\u8a18\u3002\u4e21\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u3082 HTTP\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9 500 \u3092\u8fd4\u3057\u3066\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u3067\u306f\u306a\u304f\u3001\u82f1\u8a9e\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066\u3044\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u6700\u4f4e\u9650\u30d0\u30fc\u30b8\u30e7\u30f3<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nErrorDocument 503 \/maintenance.html\r\n\r\n&lt;ifmodule mod_rewrite.c&gt;\r\n  RewriteEngine On\r\n  RewriteCond %{REQUEST_URI} !=\/maintenance.html\r\n  RewriteRule ^.*$ - [R=503,L]\r\n&lt;\/ifmodule&gt;\r\n<\/pre>\n<p>\u3057\u3063\u304b\u308a\u30d0\u30fc\u30b8\u30e7\u30f3<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nErrorDocument 503 \/maintenance.html\r\n\r\n&lt;ifmodule mod_rewrite.c&gt;\r\n  RewriteEngine On\r\n  RewriteCond %{REQUEST_URI} !=\/maintenance.html\r\n  RewriteCond %{REMOTE_ADDR} !=192.168.0.4\r\n  RewriteCond %{REMOTE_ADDR} !=192.168.0.5\r\n  RewriteRule ^.*$ - [R=503,L]\r\n&lt;\/ifmodule&gt;\r\n\r\n&lt;ifmodule mod_headers.c&gt;\r\n  Header set Retry-After &quot;Sun, 14 Jun 2009 6:00:00 GMT\r\n&lt;\/ifmodule&gt;\r\n<\/pre>\n<p>\u8abf\u3079\u3066\u307f\u308b\u3068\u3001Apache \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u308b\u554f\u984c\u306e\u3088\u3046\u306b\u601d\u3048\u308b\u3002<br \/>\nApache 1.3 \u7cfb\u3092\u4f7f\u3063\u3066\u3044\u308b\u304c\u3001redirect|R \u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u306f 300 \u304b\u3089 400 \u307e\u3067\u3057\u304b\u4f7f\u3048\u306a\u3044\u3088\u3046\u3060\u3002<\/p>\n<blockquote cite=\"http:\/\/httpd.apache.org\/docs\/1.3\/mod\/mod_rewrite.html\" title=\"Apache module mod_rewrite\">\n<p>&#8216;redirect|R [=code]&#8217; (\u5f37\u5236 redirect)<br \/>\nSubstitution \u306e\u524d\u306b (\u65b0\u3057\u3044 URL \u3092 URI \u306b\u3059\u308b) http:\/\/thishost[:thisport]\/ \u3092\u3064\u3051\u308b\u3053\u3068\u306b\u3088\u308a\u5f37\u5236\u7684\u306a\u5916\u90e8\u30ea\u30c0\u30a4\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u884c\u306a\u3044\u307e\u3059\u3002 code \u304c\u6307\u5b9a\u3055\u308c\u306a\u3044\u5834\u5408\u3001HTTP \u30ec\u30b9\u30dd\u30f3\u30b9\u306e 302 (MOVED TEMPORARILY) \u304c\u4f7f\u308f\u308c\u307e\u3059\u3002300 \u304b\u3089 400 \u307e\u3067\u306e\u4ed6\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u3092\u8fd4\u3057\u305f\u3044\u5834\u5408\u306f\u3001 \u76f4\u63a5\u305d\u306e\u756a\u53f7\u3092\u6307\u5b9a\u3059\u308b\u304b\u3001\u30b7\u30f3\u30dc\u30eb\u540d temp (\u30c7\u30d5\u30a9\u30eb\u30c8), permanent, seeother \u306e\u3044\u305a\u308c\u304b\u3092\u4f7f\u3044\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001&#8220;\/~&#8221; \u3092 &#8220;\/u\/&#8221; \u306b\u5909\u63db\u3057\u305f\u308a\u3001\u5e38\u306b \/u\/ user \u306b\u30b9\u30e9\u30c3\u30b7\u30e5\u3092\u8ffd\u52a0\u3059\u308b\u306a\u3069\u306e\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b \u6b63\u898f\u5316 \u3055\u308c\u305f URL \u3092\u8fd4\u3059\u30eb\u30fc\u30eb\u306b\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p class=\"citation\"><a href=\"http:\/\/httpd.apache.org\/docs\/1.3\/mod\/mod_rewrite.html\"><cite>Apache module mod_rewrite<\/cite><\/a><\/p>\n<\/blockquote>\n<p>\u3082\u3068\u306e\u6587\u7ae0\u3092\u3088\u304f\u8aad\u3080\u3068 Apache 2.2\u7cfb \u306e\u8a71\u3068\u6700\u5f8c\u306b\u66f8\u304b\u308c\u3066\u3044\u305f\u3002\u81ea\u5206\u304c\u4f55\u304b\u66f8\u304f\u5834\u5408\u306f\u3001\u4f7f\u3048\u308b\u6761\u4ef6\u306a\u3069\u304c\u3042\u308b\u5834\u5408\u306f\u6700\u521d\u306b\u66f8\u3044\u3066\u304a\u304f\u3088\u3046\u306b\u5fc3\u639b\u3051\u3066\u304a\u3053\u3046\u3068\u601d\u3063\u305f\u3002<\/p>\n<p>\u4e0a\u8a18\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30b3\u30fc\u30c9\u306e\u3053\u3068\u3092\u8abf\u3079\u3066\u3044\u305f\u3089\u3001\u5bfe\u51e6\u65b9\u6cd5\u304c\u66f8\u304b\u308c\u3066\u3044\u305f\u306e\u3067\u3053\u3061\u3089\u3092\u53c2\u8003\u306b\u3057\u3066\u305f\u3089\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u305f\u3002<\/p>\n<p><a href=\"http:\/\/labs.unoh.net\/2007\/07\/post_93.html\" class=\"note\">\u30a6\u30ce\u30a6\u30e9\u30dc Unoh Labs: \u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u3092\u7c21\u5358\u306b\u51fa\u3057\u3066\u307f\u308b<\/a><\/p>\n<p>PHP\u3092\u4f7f\u3048\u308b\u3068\u3044\u3046\u6761\u4ef6\u304c\u4ed8\u304d\u3060\u304c\u3001\u3053\u308c\u3060\u3063\u305f\u3089 Apache \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5f71\u97ff\u3055\u308c\u306a\u305d\u3046\u3002<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&lt;IfModule mod_rewrite.c&gt;\r\nRewriteEngine On\r\nRewriteRule ^503\/ - [L]\r\nRewriteCond %{REMOTE_ADDR} !=XXX.XXX.XXX.XXX\r\nRewriteRule ^.*$ 503\/index.php\r\n&lt;\/IfModule&gt;\r\n<\/pre>\n<p>\u203bREMOTE_ADDR \u306e \u300eXXX.XXX.XXX.XXX\u300f \u90e8\u5206\u306f \u7ba1\u7406\u8005\u306e IP \u3092\u5165\u308c\u3066\u304a\u3051\u3070\u3001\u7ba1\u7406\u8005\u306f\u4f5c\u696d\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3002\uff08\uff09<br \/>\n\u203b\u6c17\u5206\u7684\u306b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u914d\u4e0b\u306b index.php \u304c\u306a\u3044\u306e\u306f\u597d\u304d\u3067\u306f\u306a\u3044\u306e\u3067\u3001503.php \u306f index.php \u306b\u3057\u305f\u3002<br \/>\n\u203bindex.php \u306e\u5185\u5bb9\u306f 503.php \u3068\u540c\u3058\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;?php\r\n    header ('HTTP\/1.0 503 Service Temporarily Unavailable');\r\n    include(dirname(__FILE__) . '\/maintenance.html');\r\n<\/pre>\n<p>WordPress \u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3067\u4f7f\u3063\u305f\u306e\u3067\u3001\u672c\u6765\u306f\u3082\u3046\u3059\u3053\u3057\u8a18\u8ff0\u304c\u5fc5\u8981\u3060\u3063\u305f\u304c\u9577\u304f\u306a\u3063\u305f\u306e\u3067\u5225\u9014\u8a18\u8ff0\u3059\u308b\u3002<\/p>\n<p><a href=\"https:\/\/www.zontheworld.com\/blog\/archives\/77\" class=\"note\">WordPress \u3067\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u3092\u8868\u793a\u3059\u308b .htaccess \u306e\u66f8\u304d\u65b9<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress \u306e\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3092\u3059\u308b\u305f\u3081\u306b\u3001\u3061\u3087\u3046\u3069\u30d6\u30c3\u30af\u30de\u30fc\u30af\u3057\u3066\u304a\u3044\u305f \u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u4e2d\u753b\u9762\u3092\u51fa\u3059\u6b63\u3057\u3044\u4f5c\u6cd5\u3068.htaccess\u306e\u66f8\u304d\u65b9 | Web\u62c5\u5f53\u8005Forum \u3092\u53c2\u8003\u306b\u3057\u3066\u30e1\u30f3\u30c6\u30ca\u30f3\u30b9\u753b\u9762\u3092\u51fa\u305d\u3046\u3068\u3057\u305f\u3089\u30e1 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[30],"_links":{"self":[{"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/posts\/76"}],"collection":[{"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":0,"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zontheworld.com\/blog\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}