{"id":782,"date":"2012-10-18T19:00:47","date_gmt":"2012-10-18T10:00:47","guid":{"rendered":"http:\/\/www.mogumagu.com\/wp\/wordpress\/?p=782"},"modified":"2012-10-19T00:14:44","modified_gmt":"2012-10-18T15:14:44","slug":"%e7%89%b9%e5%ae%9a%e3%81%ae%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%ef%bc%88url%ef%bc%89%e3%82%92%e9%99%a4%e3%81%84%e3%81%9findex-html%e3%81%ae%e6%9c%89%e3%82%8a%e3%80%81%e7%84%a1%e3%81%97%e3%81%ae","status":"publish","type":"post","link":"https:\/\/www.mogumagu.com\/wp\/wordpress\/archives\/782","title":{"rendered":"\u7279\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\uff08URL\uff09\u3092\u9664\u3044\u305findex.html\u306e\u6709\u308a\u3001\u7121\u3057\u306e\u7d71\u4e00"},"content":{"rendered":"<div class=\"65a9d09a7d046572b7ae2e4674a406ee\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-0496250084394782\";\r\ngoogle_ad_slot = \"5624605187\";\r\ngoogle_ad_width = 300;\r\ngoogle_ad_height = 250;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"https:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<h2>\u7279\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\uff08URL\uff09\u3092\u9664\u3044\u305findex.html\u306e\u6709\u308a\u3001\u7121\u3057\u306e\u7d71\u4e00<\/h2>\n<p>mod_rewrite\u306f\u4f55\u5ea6\u8abf\u3079\u3066\u3082\u5168\u7136\u899a\u3048\u3089\u308c\u307e\u305b\u3093\u3002\u3002<\/p>\n<p>SEO\u95a2\u9023\u3067\u8abf\u6574\u3059\u308b\u3088\u3046\u8a00\u308f\u308c\u305f\u306e\u3067\u8abf\u67fb\u3002<br \/>\nindex.html\u306e\u6709\u308a\u3001\u7121\u3057\u306e\u7d71\u4e00\u3068\u3044\u3046\u3042\u308a\u304c\u3061\u306a\u8a71\u3002<br \/>\n\u3053\u3093\u306a\u611f\u3058\u3002<br \/>\nhogehoge\/index.html\u3092hogehoge\/\u306b\u3059\u308b\u3002<\/p>\n<p>\u305f\u3060\u4eca\u56de\u306f\u7279\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\uff08URL\uff09\u306e\u5834\u5408\u3092\u9664\u304f\u3068\u3044\u3046\u6307\u4ee4\u3002<\/p>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30d5\u30a9\u30eb\u30c0\u69cb\u6210<\/strong><\/p>\n<blockquote><p>&#8212; base<br \/>\n|&#8211; a<br \/>\n| `&#8211; index.html<br \/>\n|&#8211; b<br \/>\n| `&#8211; index.html<br \/>\n|&#8211; c<br \/>\n| |&#8211; cc<br \/>\n| | `&#8211; index.html<br \/>\n| `&#8211; index.html<br \/>\n`&#8211; index.html<\/p><\/blockquote>\n<p><strong>.htaccess\u306e\u8a18\u8ff0<\/strong><\/p>\n<blockquote><p>RewriteEngine on<br \/>\nRewriteCond %{THE_REQUEST} !^.*\/b\/index.html<br \/>\nRewriteCond %{THE_REQUEST} ^.*\/index.html<br \/>\nRewriteRule ^(.*)index.html$ http:\/\/example.com\/base\/$1 [R=301,L]<\/p><\/blockquote>\n<p>\u3053\u306e\u5834\u5408<br \/>\nhttp:\/\/example.com\/base\/b\/index.html<br \/>\n\u3060\u3051index.html\u304c\u66f8\u304d\u63db\u3048\u3089\u308c\u306a\u3044\u3002<\/p>\n<p>RewriteCond\u306f\u9023\u7d9a\u3057\u3066\u66f8\u304f\u3068AND\u306b\u306a\u308b\u304b\u3089\u3002<br \/>\nOR\u3067\u3064\u306a\u3052\u305f\u3044\u5834\u5408\u306f[OR]\u3092\u3064\u3051\u308b<br \/>\nRewriteCond\u306e\u6761\u4ef6\u3067\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3092\u533a\u5225\u3057\u306a\u3044\u5834\u5408\u306f[NC]\u3092\u3064\u3051\u308b<\/p>\n<p><strong>\u25a0RewireRule\u306e\u66f8\u5f0f<\/strong><br \/>\nRewriteRule Pattern Substitution [flags]<br \/>\n\u304f\u308f\u3057\u304f\u306f<a href=\"http:\/\/net-newbie.com\/trans\/mod_rewrite.html#RewriteRule\" target=\"_blank\">\u3053\u3061\u3089<\/a><\/p>\n<p><strong>\u25a0flags\u306e\u7a2e\u985e<\/strong><\/p>\n<ul>\n<li>redirect|R [=code] (\u5f37\u5236 redirect)<\/li>\n<li>forbidden|F (URL \u3092\u5f37\u5236\u7684\u306b forbidden\uff08\u7981\u6b62\uff09\u306b\u3059\u308b)<\/li>\n<li>gone|G (URL \u3092\u5f37\u5236\u7684\u306b gone\uff08\u6d88\u53bb\u6e08\u307f\uff09\u306b\u3059\u308b)<\/li>\n<li>proxy|P (\u5f37\u5236 proxy)<\/li>\n<li>last|L (last\uff08\u6700\u5f8c\u306e\uff09\u30eb\u30fc\u30eb)<\/li>\n<li>next|N (next\uff08\u6b21\u306e\uff09\u4e00\u5468)<\/li>\n<li>chain|C (\u6b21\u306e\u30eb\u30fc\u30eb\u306bchained (\u30c1\u30a7\u30a4\u30f3))<\/li>\n<li>type|T=MIME-type (MIME type \u306e\u5f37\u5236\u6307\u5b9a)<\/li>\n<li>nosubreq|NS (\u5185\u90e8\u306e sub-request \u304c no (\u306a\u3044) \u6642\u306e\u307f \u4f7f\u308f\u308c\u308b)<\/li>\n<li>nocase|NC (no case)<\/li>\n<li>qsappend|QSA (query string append)<\/li>\n<li>noescape|NE (no URI escaping of output)<\/li>\n<li>passthrough|PT (pass through to next handler)<\/li>\n<li>skip|S=\u6570\u5b57 (skip next rule(s))<\/li>\n<li>env|E=VAR:VAL (set environment variable)<\/li>\n<\/ul>\n<h3>\u53c2\u8003\u30b5\u30a4\u30c8<\/h3>\n<p><a title=\"\u697d\uff1a\u6280\u6797\u30d6\u30ed\u30b0\uff1emod_rewrite \u30b5\u30f3\u30d7\u30eb\u96c6\" href=\"http:\/\/tech.bayashi.jp\/archives\/entry\/techweb\/2007\/001981.html\" target=\"_blank\">\u697d\uff1a\u6280\u6797\u30d6\u30ed\u30b0\uff1emod_rewrite \u30b5\u30f3\u30d7\u30eb\u96c6<\/a><\/p>\n<p><a title=\"\u6280\u6797TOP &gt; \u81ea\u5b85\u30b5\u30fc\u30d0\u69cb\u7bc9\u30e1\u30e2 &gt; mod_rewrite\" href=\"http:\/\/tech.bayashi.net\/svr\/doc\/apache\/mod_rewrite.html\" target=\"_blank\">\u6280\u6797TOP &gt; \u81ea\u5b85\u30b5\u30fc\u30d0\u69cb\u7bc9\u30e1\u30e2 &gt; mod_rewrite<\/a><\/p>\n<p><a title=\"index.html\u300c\u3042\u308a\u30fb\u306a\u3057\u300d\u306eURL\u6b63\u898f\u5316 \u2013 301\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5fdc\u7528\u7de8\" href=\"http:\/\/www.suzukikenichi.com\/blog\/canonicalization-of-indexhtml-and-non-indexhtml\/\" target=\"_blank\">index.html\u300c\u3042\u308a\u30fb\u306a\u3057\u300d\u306eURL\u6b63\u898f\u5316 \u2013 301\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5fdc\u7528\u7de8<\/a><\/p>\n<p><a title=\"A Users Guide to URL Rewriting with the Apache Webserver\" href=\"http:\/\/japache.infoscience.co.jp\/rewriteguide\/\" target=\"_blank\">A Users Guide to URL Rewriting with the Apache Webserver<\/a><\/p>\n<p><a title=\"mod_rewrite \u30e2\u30b8\u30e5\u30fc\u30eb URL \u66f8\u304d\u63db\u3048\u30a8\u30f3\u30b8\u30f3\" href=\"http:\/\/net-newbie.com\/trans\/mod_rewrite.html#RewriteRule\" target=\"_blank\">mod_rewrite \u30e2\u30b8\u30e5\u30fc\u30eb URL \u66f8\u304d\u63db\u3048\u30a8\u30f3\u30b8\u30f3<\/a><\/p>\n<p><iframe src=\"http:\/\/rcm-jp.amazon.co.jp\/e\/cm?t=lax34weddojp-22&#038;o=9&#038;p=8&#038;l=as1&#038;asins=4873111501&#038;ref=tf_til&#038;fc1=000000&#038;IS2=1&#038;lt1=_blank&#038;m=amazon&#038;lc1=0000FF&#038;bc1=000000&#038;bg1=FFFFFF&#038;f=ifr\" style=\"width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"><\/iframe><\/p>\n<div class=\"65a9d09a7d046572b7ae2e4674a406ee\" data-index=\"3\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\namazon_ad_tag = \"lax34weddojp-22\"; amazon_ad_width = \"468\"; amazon_ad_height = \"60\"; amazon_ad_link_target = \"new\"; amazon_ad_border = \"hide\";\/\/--><\/script>\r\n<script type=\"text\/javascript\" src=\"https:\/\/www.assoc-amazon.jp\/s\/ads.js\"><\/script>\n<\/div>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u7279\u5b9a\u306e\u30d5\u30a1\u30a4\u30eb\uff08URL\uff09\u3092\u9664\u3044\u305findex.html\u306e\u6709\u308a\u3001\u7121\u3057\u306e\u7d71\u4e00 mod_rewrite\u306f\u4f55\u5ea6\u8abf\u3079\u3066\u3082\u5168\u7136\u899a\u3048\u3089\u308c\u307e\u305b\u3093\u3002\u3002 SEO\u95a2\u9023\u3067\u8abf\u6574\u3059\u308b\u3088\u3046\u8a00\u308f\u308c\u305f\u306e\u3067\u8abf\u67fb\u3002 index.html\u306e\u6709\u308a\u3001\u7121\u3057\u306e\u7d71\u4e00\u3068\u3044\u3046 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[13,3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/posts\/782"}],"collection":[{"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/comments?post=782"}],"version-history":[{"count":4,"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/posts\/782\/revisions"}],"predecessor-version":[{"id":786,"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/posts\/782\/revisions\/786"}],"wp:attachment":[{"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/media?parent=782"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/categories?post=782"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mogumagu.com\/wp\/wordpress\/wp-json\/wp\/v2\/tags?post=782"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}