{"id":28,"date":"2006-05-21T19:02:11","date_gmt":"2006-05-21T10:02:11","guid":{"rendered":"http:\/\/pasero.net\/~mako\/blog\/s\/28"},"modified":"2011-02-04T22:49:57","modified_gmt":"2011-02-04T13:49:57","slug":"mod_rewrite","status":"publish","type":"post","link":"https:\/\/pasero.net\/~mako\/blog\/s\/28","title":{"rendered":"mod_rewrite"},"content":{"rendered":"<p>\u3057\u3070\u3089\u304f\u9593\u304c\u7a7a\u3044\u3066\u3057\u307e\u3063\u305f\u3002WordPress\u81ea\u4f53\u304c\u3042\u307e\u308a\u624b\u304c\u304b\u304b\u3089\u306a\u3044\u3088\u3046\u3067\u3001\u3072\u3068\u3068\u304a\u308a\u8a2d\u5b9a\u3057\u3066\u3057\u307e\u3048\u3070\u7279\u306b\u554f\u984c\u3082\u306a\u304f\u3001\u66f8\u304f\u3053\u3068\u3082\u306a\u3044\u3002<\/p>\r\n<p>\u4eca\u56de\u306e\u4ef6\u306f WordPress \u30ab\u30c6\u30b4\u30ea\u306b\u542b\u3081\u308b\u306e\u3082\u4f55\u3060\u3068\u3044\u3046\u6c17\u3082\u3059\u308b\u304c\u3001\u305d\u306e\u95a2\u9023\u3068\u3044\u3046\u3053\u3068\u3067\u3002<\/p>\r\n<p>WordPress\u5c0e\u5165\u6642\u3001<code>.htaccess<\/code>\u306b\u81ea\u52d5\u7684\u306b<\/p>\r\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# BEGIN WordPress\r\n&lt;ifmodule mod_rewrite.c&gt;\r\nRewriteEngine On\r\nRewriteBase \/\r\nRewriteCond %{REQUEST_FILENAME} !-f\r\nRewriteCond %{REQUEST_FILENAME} !-d\r\nRewriteRule . \/index.php &#x5B;L]\r\n&lt;\/ifmodule&gt;\r\n# END WordPress\r\n<\/pre>\r\n<p>\u3068\u66f8\u304d\u8fbc\u307e\u308c\u308b\u3002\u5b9f\u5728\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u540d\u30fb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d\u3067\u306a\u3044\u5834\u5408\u3001<code>\/index.php<\/code> \u304c\u547c\u3070\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\r\n<p>\u3055\u3066\u3001WordPress \u5c0e\u5165\u4ee5\u524d\u306b\u540c\u3058\u30b5\u30a4\u30c8\u3067\u67d0\u65e5\u8a18\u30b7\u30b9\u30c6\u30e0\u3092\u4f7f\u3063\u3066\u3044\u305f\u306e\u3060\u304c\u3001\u305d\u306e URL \u306f<\/p>\r\n<pre>\r\nhttp:\/\/www.example.com\/?date=20050325\r\n<\/pre>\r\n<p>\u306e\u3088\u3046\u306b\u306a\u308b\u3082\u306e\u3067\u3042\u3063\u305f\u3002\u73fe\u5728\u3053\u306e URL \u3067\u6307\u793a\u3055\u308c\u308b\u3082\u306e\u306f\u306a\u3044\u306e\u3060\u304c\u3001\u4e0a\u8a18\u306b\u3088\u308a\u3001404 \u30a8\u30e9\u30fc\u306b\u306f\u306a\u3089\u305a\u3001\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\r\n<p>\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u306b\u65e7\u3044\u5f62\u5f0f\u306e URL \u304c\u6b8b\u3063\u3066\u3044\u3066\u3001\u3057\u304b\u3082\u3044\u307e WordPress \u3067\u4f5c\u3089\u308c\u305f\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u304c\u305d\u306e\u65e7\u3044\u5f62\u5f0f\u306e URL \u306e\u5185\u5bb9\u3068\u3057\u3066\u7740\u3005\u3068\u66f4\u65b0\u3055\u308c\u7d9a\u3051\u308b\u3002WordPress \u3067\u66f8\u3044\u305f\u6700\u65b0\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u304c\u3001<code>http:\/\/www.example.com\/?date=20050325<\/code> \u306e\u3082\u306e\u3068\u3057\u3066\u691c\u7d22\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3060\u3002<\/p>\r\n<p>\u653e\u3063\u3066\u304a\u3044\u3066\u3082\u305d\u306e\u9023\u9396\u306f\u65ad\u3061\u5207\u308c\u306a\u3044\u306e\u3067\u3001<a href=\"http:\/\/www.math.tohoku.ac.jp\/~kuroki\/keijiban\/Robots.html\" >\u30ed\u30dc\u30c3\u30c8\u5bfe\u7b56<\/a>\u3092\u53c2\u8003\u306b\u3001<code>.htaccess<\/code> \u306b\u6b21\u306e\u3088\u3046\u306b\u66f8\u304d\u52a0\u3048\u3066\u307f\u305f<sup>[<a href=\"#footnote_1_28\" id=\"identifier_1_28\" class=\"footnote-link footnote-identifier-link\" title=\"(A or B or C) and D \u306f mod_rewrite \u306e\u6587\u6cd5\u3067\u3069\u3046\u66f8\u304f\u306e\u3060\u308d\u3046\u3002\u306f\u3063\u304d\u308a\u3057\u306a\u3044\u306e\u3067\u5197\u9577\u306b\u66f8\u3044\u305f\u3002\">1<\/a>]<\/sup>\u3002<\/p>\r\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;ifmodule mod_rewrite.c&gt;\r\nRewriteCond %{HTTP_USER_AGENT} archiver &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} crawler &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} robot &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} slurp &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} spider &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} googlebot &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} msnbot &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\nRewriteCond %{HTTP_USER_AGENT} findlinks &#x5B;NC]\r\nRewriteCond %{QUERY_STRING} .*date=200.*\r\nRewriteRule ^.*$ - &#x5B;G,L]\r\n&lt;\/ifmodule&gt;\r\n<\/pre>\r\n<p>\u65e7URL\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u3001(1)\u305b\u3063\u304b\u304f\u691c\u7d22\u3057\u3066\u898b\u3064\u3051\u3066\u6765\u3066\u304f\u308c\u308b\u4eba\u306b\u306f\u4eca\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u307f\u3066\u3044\u305f\u3060\u304f (2)\u691c\u7d22\u30ed\u30dc\u30c3\u30c8\u306a\u3089 410 \u30a8\u30e9\u30fc\u3092\u8fd4\u3059\u3001\u3068\u3057\u305f\u3002\u3053\u3046\u3057\u3066\u304a\u3051\u3070\u305d\u306e\u3046\u3061\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u304b\u3089\u6d88\u3048\u308b\u3060\u308d\u3046\u3057\u3001\u6614\u306e\u8a18\u4e8b\u306b\u76f4\u63a5\u30ea\u30f3\u30af\u3057\u3066\u3044\u308b\u4eba\u306f\u307b\u307c\u3044\u306a\u3044\u3060\u308d\u3046\u304b\u3089\u3001\u65e7URL\u3078\u306e\u30a2\u30af\u30bb\u30b9\u306f\u7d76\u6ec5\u3059\u308b\u3060\u308d\u3046\u3068\u8003\u3048\u305f\u3002<\/p>\r\n<p>&#8212;-<\/p>\r\n<p>\u3068\u3044\u3046\u5bfe\u7b56\u3092\u3068\u3063\u305f\u306e\u304c\u5b9f\u306f1\u30f6\u6708\u524d\u3002\u3060\u3044\u305f\u3044\u601d\u3063\u305f\u3068\u304a\u308a\u306b\u7d76\u6ec5\u306b\u5411\u304b\u3063\u3066\u3044\u3063\u305f\u306e\u3060\u304c\u3001Yahoo \u306e Slurp \u3068\u3044\u3046\u306e\u306f\u884c\u5100\u304c\u60aa\u3044\u306e\u304b<sup>[<a href=\"#footnote_2_28\" id=\"identifier_2_28\" class=\"footnote-link footnote-identifier-link\" title=\"\u30ed\u30b0\u3092\u898b\u308b\u3068\u30a2\u30af\u30bb\u30b9\u983b\u5ea6\u3082\u3084\u305f\u3089\u3068\u591a\u3044\">2<\/a>]<\/sup>\u3001\u306a\u304b\u306a\u304b\u6839\u7d76\u3067\u304d\u306a\u3044\u3002<\/p>\r\n<p>\u305d\u3057\u3066\u4eca\u65e5\u3001\u691c\u7d22\u3067\u65e7 URL \u3092\u305f\u3069\u3063\u3066\u304f\u308b\u4eba\u304c\u306a\u305c\u304b\u5897\u3048\u3066\u3044\u308b\u3002\u78ba\u8a8d\u3059\u308b\u3068\u3001<code>.htaccess<\/code> \u306e\u5f53\u8a72\u90e8\u5206\u304c\u3059\u3063\u304b\u308a\u6d88\u3048\u3066\u3044\u308b\u3002\u30d5\u30a1\u30a4\u30eb\u306e\u6642\u523b\u3092\u898b\u308b\u3068\u3001\u7d76\u5bfe\u306b\u81ea\u5206\u3067\u4f55\u304b\u3092\u3057\u305f\u6642\u523b\u3067\u306f\u306a\u3044\u3002WordPress \u304c\u3053\u308c\u3092\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u306f\u306a\u3044\u3068\u601d\u3046\u3057\u3001\u305d\u3046\u3059\u308b\u3068\u3053\u308c\u3092\u7f6e\u3044\u3066\u3044\u308b<a href=\"http:\/\/www.sakura.ne.jp\/\" >\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0<\/a>\u306e\u554f\u984c\u306a\u306e\u3060\u308d\u3046\u304b\u3002\u306a\u3093\u3060\u304b\u6c17\u6301\u3061\u304c\u60aa\u3044\u3002<\/p>\r\n<ol class=\"footnotes\"><li id=\"footnote_1_28\" class=\"footnote\"> (A or B or C) and D \u306f mod_rewrite \u306e\u6587\u6cd5\u3067\u3069\u3046\u66f8\u304f\u306e\u3060\u308d\u3046\u3002\u306f\u3063\u304d\u308a\u3057\u306a\u3044\u306e\u3067\u5197\u9577\u306b\u66f8\u3044\u305f\u3002<span class=\"footnote-back-link-wrapper\"><a href=\"#identifier_1_28\" class=\"footnote-link footnote-back-link\">&#8593;<\/a><\/span><\/li><li id=\"footnote_2_28\" class=\"footnote\">\u30ed\u30b0\u3092\u898b\u308b\u3068\u30a2\u30af\u30bb\u30b9\u983b\u5ea6\u3082\u3084\u305f\u3089\u3068\u591a\u3044<span class=\"footnote-back-link-wrapper\"><a href=\"#identifier_2_28\" class=\"footnote-link footnote-back-link\">&#8593;<\/a><\/span><\/li><\/ol>","protected":false},"excerpt":{"rendered":"WordPress\u306fmod_write\u306e\u6a5f\u80fd\u3092\u7528\u3044\u3066\u3001\u5b9f\u5728\u3057\u306a\u3044\u30d5\u30a1\u30a4\u30eb\u3078\u306e\u30a2\u30af\u30bb\u30b9\u8981\u6c42\u306b\u5bfe\u3057\u3066 \/index.php \u3092\u8fd4\u3059\u3088\u3046\u306b\u3001\u5c0e\u5165\u6642\u306b\u8a2d\u5b9a\u3055\u308c\u308b\u3002\u904e\u53bb\u306b\u540c\u3058URL\u3067\u5225\u306e\u4f53\u7cfb\u306e\u30b5\u30a4\u30c8\u3092\u904b\u55b6\u3057\u3066\u3044\u3066\u4e57\u308a\u63db\u3048\u305f\u5834\u5408\u3001\u3044\u307e\u3067\u306f\u5b58\u5728\u3057\u306a\u3044\u30da\u30fc\u30b8\u3078\u306e(\u7279\u306b\u691c\u7d22\u30a8\u30f3\u30b8\u30f3\u3092\u901a\u3057\u3066\u306e)\u30a2\u30af\u30bb\u30b9\u304c\u7d76\u3048\u306a\u3044\u3002\u3053\u308c\u3092\u6b62\u3081\u308b\u305f\u3081 .htaccess\u306b\u8a2d\u5b9a\u3092\u52a0\u3048\u305f\u3002\r\n&hellip; <a class=\"more-link\" href=\"https:\/\/pasero.net\/~mako\/blog\/s\/28\">\u7d9a\u304d\u3092\u8aad\u3080<span class=\"screen-reader-text\">: mod_rewrite<\/span> <span class=\"meta-nav\" aria-hidden=\"true\">&rarr;<\/span><\/a>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[74],"tags":[2],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-wordpress","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pLxlV-s","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2342,"url":"https:\/\/pasero.net\/~mako\/blog\/s\/2342","url_meta":{"origin":28,"position":0},"title":"\u3042\u3089\u305f\u3081\u3066\u30c1\u30e3\u30c3\u30c8\u30b5\u30dd\u30fc\u30c8\u3092\u69cb\u7bc9\u3059\u308b","author":"Mako","date":"2018\u5e744\u670820\u65e5(\u91d1)","format":false,"excerpt":"Converse.js \u3068\u3044\u3046 XMPP \u306e Web \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3092\u898b\u3064\u3051\u3066\u300c\u30c1\u30e3\u30c3\u30c8\u30b5\u30dd\u30fc\u30c8\u3092\u69cb\u7bc9\u2026","rel":"","context":"Jabber\/XMPP","block_context":{"text":"Jabber\/XMPP","link":"https:\/\/pasero.net\/~mako\/blog\/s\/category\/xmpp-2"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":63,"url":"https:\/\/pasero.net\/~mako\/blog\/s\/63","url_meta":{"origin":28,"position":1},"title":"\u30c6\u30fc\u30de\u3092\u4f5c\u308b (5)","author":"Mako","date":"2007\u5e743\u67089\u65e5(\u91d1)","format":false,"excerpt":"index.php, single.php \u3088\u3046\u3084\u304f\u672c\u6587\u306b\u3064\u3044\u3066\u3002 \u500b\u3005\u306e\u8a18\u4e8b\u3092\u3001\u672c\u6587\u3068\u30b3\u30e1\u30f3\u30c8\u306e2\u2026","rel":"","context":"WordPress","block_context":{"text":"WordPress","link":"https:\/\/pasero.net\/~mako\/blog\/s\/category\/wordpress"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":527,"url":"https:\/\/pasero.net\/~mako\/blog\/s\/527","url_meta":{"origin":28,"position":2},"title":"\u8457\u4f5c\u6a29\u8868\u793a\u306e\u5e74\u3092\u81ea\u52d5\u7684\u306b\u4ed8\u3051\u308b","author":"Mako","date":"2013\u5e7412\u670810\u65e5(\u706b)","format":false,"excerpt":"\u6700\u8fd1 twitter \u306b\u6d41\u308c\u3066\u304f\u308b\u8a71\u3092\u898b\u3066\u3044\u308b\u3046\u3061\u306b\u3001\u3075\u3068\u305d\u306e\u96a3\u306e\u8a18\u4e8b\u3092\u8aad\u307f\u307e\u3057\u305f\u3002\u300c\u5e74\u672b\u5e74\u59cb\u6052\u4f8b\u3001\u2026","rel":"","context":"WordPress","block_context":{"text":"WordPress","link":"https:\/\/pasero.net\/~mako\/blog\/s\/category\/wordpress"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":689,"url":"https:\/\/pasero.net\/~mako\/blog\/s\/689","url_meta":{"origin":28,"position":3},"title":"hubot-slack \u30a2\u30c0\u30d7\u30bf v2 \u304b\u3089 v3 \u3078","author":"Mako","date":"2014\u5e7412\u670813\u65e5(\u571f)","format":false,"excerpt":"\u3082\u3046\u65e5\u3082\u5909\u308f\u308d\u3046\u3068\u3044\u3046\u6642\u9593\u306b\u306a\u3063\u3066\u3082 Hubot Advent Calendar 2014 \u306e13\u65e5\u2026","rel":"","context":"\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2","block_context":{"text":"\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2","link":"https:\/\/pasero.net\/~mako\/blog\/s\/category\/software"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":558,"url":"https:\/\/pasero.net\/~mako\/blog\/s\/558","url_meta":{"origin":28,"position":4},"title":"\u30c1\u30e3\u30c3\u30c8\u30b5\u30dd\u30fc\u30c8\u3092\u69cb\u7bc9\u3059\u308b (\u305d\u306e2) \u30b5\u30fc\u30d0\u30fc ejabberd \u306e\u6e96\u5099","author":"Mako","date":"2014\u5e741\u670820\u65e5(\u6708)","format":false,"excerpt":"\u30102018\u5e744\u670820\u65e5\u8ffd\u8a18\u3011\u3053\u306e\u8a18\u4e8b\u306f\u5185\u5bb9\u304c\u53e4\u304f\u306a\u3063\u3066\u3044\u308b\u90e8\u5206\u304c\u3042\u308a\u307e\u3059\u3002\u300c\u3042\u3089\u305f\u3081\u3066\u30c1\u30e3\u30c3\u30c8\u30b5\u30dd\u30fc\u2026","rel":"","context":"Jabber\/XMPP","block_context":{"text":"Jabber\/XMPP","link":"https:\/\/pasero.net\/~mako\/blog\/s\/category\/xmpp-2"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":502,"url":"https:\/\/pasero.net\/~mako\/blog\/s\/502","url_meta":{"origin":28,"position":5},"title":"wp-login.php \u3078\u306e\u653b\u6483\u306b\u5bfe\u51e6\u3059\u308b","author":"Mako","date":"2013\u5e749\u670824\u65e5(\u706b)","format":false,"excerpt":"\u30b5\u30fc\u30d0\u30fc\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u4f5c\u696d\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u975e\u5e38\u306b\u53cd\u5fdc\u304c\u60aa\u304f\u3001\u3069\u3046\u3057\u305f\u3053\u3068\u304b\u3068\u898b\u3066\u307f\u308b\u3068(\u666e\u6bb5\u3068\u9055\u3063\u3066\u3001\u2026","rel":"","context":"WordPress","block_context":{"text":"WordPress","link":"https:\/\/pasero.net\/~mako\/blog\/s\/category\/wordpress"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/comments?post=28"}],"version-history":[{"count":0,"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/media?parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/categories?post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pasero.net\/~mako\/blog\/wp-json\/wp\/v2\/tags?post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}