{"id":34,"date":"2018-11-25T13:37:15","date_gmt":"2018-11-25T04:37:15","guid":{"rendered":"https:\/\/r-side.net\/?p=34"},"modified":"2018-11-25T19:30:50","modified_gmt":"2018-11-25T10:30:50","slug":"post-34","status":"publish","type":"post","link":"https:\/\/r-side.net\/kw\/?p=34","title":{"rendered":"\u30a2\u30af\u30bb\u30b9\u5148\u3067\u30c6\u30fc\u30de\u3092\u5207\u308a\u66ff\u3048\u308b\u306b\u306f"},"content":{"rendered":"<p>WordPress\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u304d\u306b\u3001http:\/\/example\/xxx\/\u3068\u6307\u5b9a\u3059\u308b\u3053\u3068\u306b\u3088\u308axxx\u3067\u6307\u5b9a\u3057\u305f\u30c6\u30fc\u30de\u3067\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305a\u3001URL\u306b\u3064\u3044\u3066\u3067\u3059\u304c\u3001\u901a\u5e38\u306f\u30b5\u30a4\u30c8\u30a2\u30c9\u30ec\u30b9\uff08URL\uff09\u306b\u6307\u5b9a\u3057\u305f\u30a2\u30c9\u30ec\u30b9\u3057\u304b\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u305d\u3053\u3067\u3001\u30a2\u30af\u30bb\u30b9\u6642\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3055\u308c\u305fURL\u3092\u8abf\u3079\u3066\u3001\u30b5\u30a4\u30c8\u30a2\u30c9\u30ec\u30b9\u3092\u66f8\u304d\u63db\u3048\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u7de8\u96c6\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u306f\u3001wp-config.php\u3067\u3059\u3002<\/p>\n<p>switch(substr($_SERVER[&#8220;REQUEST_URI&#8221;],0,4)){<br \/>\ncase &#8216;\/xx\/&#8217;:<br \/>\ndefine(&#8216;WP_HOME&#8217;,&#8217;https:\/\/&#8217; . $_SERVER[&#8220;HTTP_HOST&#8221;] . &#8216;\/xx&#8217;);<br \/>\nbreak;<br \/>\ncase &#8216;\/yy\/&#8217;:<br \/>\ndefine(&#8216;WP_HOME&#8217;,&#8217;https:\/\/&#8217; . $_SERVER[&#8220;HTTP_HOST&#8221;] . &#8216;\/yy&#8217;);<br \/>\nbreak;<br \/>\n}<\/p>\n<p><span style=\"display: inline !important; float: none; background-color: #ffffff; color: #000000; cursor: text; font-family: 'Meiryo',-apple-system,'BlinkMacSystemFont','.SFNSDisplay-Regular','Hiragino Kaku Gothic Pro','Yu Gothic','MS PGothic','Segoe UI','Verdana','Helvetica','Arial',sans-serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;\">\u3053\u3093\u306a\u611f\u3058\u3067\u3001\u9069\u5f53\u306b2\u6587\u5b57\u306e\u30b5\u30d5\u30a3\u30c3\u30af\u30b9\u3067\u5bfe\u5fdc\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u60f3\u5b9a\u5916\u306e\u30a2\u30af\u30bb\u30b9\u306f\u901a\u5e38\u30b5\u30a4\u30c8\u306b\u98db\u3070\u3059\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u30dd\u30a4\u30f3\u30c8\u306fWP_HOME\u306e\u65b9\u3092\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u3067\u3059\u3002\u3042\u3068\u306f\u3001<a href=\"https:\/\/wpdocs.osdn.jp\/Giving_WordPress_Its_Own_Directory\">\u30b5\u30a4\u30c8\u306e\u30db\u30fc\u30e0\u30da\u30fc\u30b8\u3068\u3057\u3066 WordPress \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u306f\u7570\u306a\u308b\u5834\u6240\u3092\u8a2d\u5b9a\u3059\u308b\u5834\u5408<\/a>\u306b\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3001\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u308a\u3001index.php\u3092\u4fee\u6b63\u3057\u307e\u3059\u3002<\/span><\/p>\n<p>\u7d9a\u3044\u3066\u3001\u30c6\u30fc\u30de\u306e\u5207\u308a\u66ff\u3048\u90e8\u5206\u3092\u4f5c\u308b\u3053\u3068\u306b\u3057\u307e\u3059\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f5c\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3089\u3057\u3044\u306e\u3067\u3001wp-content\/plugins\/\u30d5\u30a9\u30eb\u30c0\u306e\u4e2d\u306b\u3001my_theme_change.php\u3092\u4f5c\u6210\u3057\u3001\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002case\u306e\u5185\u5bb9\u306fwp-config.php\u3067\u4f5c\u6210\u3057\u305f\u5185\u5bb9\u3092\u3001\u30c6\u30fc\u30de\u540d\u306fwp-content\/themes\/\u30d5\u30a9\u30eb\u30c0\u5185\u306b\u3042\u308b\u30c6\u30fc\u30de\u306e\u30d5\u30a9\u30eb\u30c0\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<div>&lt;?php<br \/>\nfunction my_theme_change($template) {<br \/>\nswitch(substr(home_url(),-3)){<br \/>\ncase &#8216;\/xx&#8217;:<br \/>\nreturn &#8216;\u30c6\u30fc\u30de\u540d\uff11&#8217;;<br \/>\ncase &#8216;\/yy&#8217;:<br \/>\nreturn &#8216;\u30c6\u30fc\u30de\u540d\uff12&#8217;;<br \/>\n}<br \/>\nreturn $template;<br \/>\n}<\/div>\n<div>add_filter(&#8216;template&#8217;, &#8216;my_theme_change&#8217;);<br \/>\nadd_filter(&#8216;stylesheet&#8217;, &#8216;my_theme_change&#8217;);<br \/>\n?&gt;<\/div>\n<p>\u3053\u308c\u3067\u3001\u30a2\u30c9\u30ec\u30b9\u306e\u6700\u5f8c\u306bxx\u3084yy\u3092\u4ed8\u3051\u52a0\u3048\u308b\u3053\u3068\u3067\u3001\u304a\u597d\u307f\u306e\u30c6\u30fc\u30de\u3067\u8868\u793a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u3063\u3066\u3001\u66f8\u3044\u3066\u3042\u308a\u307e\u3057\u305f\u304c\u3002<span style=\"color: #ff0000;\">\u672c\u5f53\u3067\u3059\u304b\uff1f<\/span><br \/>\n\u30b5\u30a4\u30c9\u30d1\u30cd\u30eb\u306b\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u304c\u8868\u793a\u3055\u308c\u306a\u3044\u306e\u3067\u3059\u304c\uff0e\uff0e\uff0e\u3002\u3042\u3068\u3001\u30e1\u30cb\u30e5\u30fc\u3082\u8868\u793a\u3055\u308c\u307e\u305b\u3093\u3002\u3069\u3046\u3084\u3089\u3001\u6709\u52b9\u304b\u3057\u3066\u3044\u308b\u30c6\u30fc\u30de\u3057\u304b\u30b5\u30a4\u30c9\u30d1\u30cd\u30eb\u306a\u3069\u306e\u8a2d\u5b9a\u304c\u8aad\u307f\u8fbc\u3081\u306a\u3044\u69d8\u306a\u611f\u3058\u3067\u3059\u3002\u8272\u3005\u8abf\u3079\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u308f\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u307b\u304b\u306e\u4eba\u306f\u30b5\u30a4\u30c9\u30d1\u30cd\u30eb\u3084\u30e1\u30cb\u30e5\u30fc\u3092\u4f7f\u7528\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3057\u3087\u3046\u304b\u3002\u65b9\u6cd5\u304c\u5206\u304b\u308c\u3070\u306a\u3093\u3068\u304b\u3057\u305f\u3044\u3068\u3053\u308d\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u304d\u306b\u3001http:\/\/example\/xxx\/\u3068\u6307\u5b9a\u3059\u308b\u3053\u3068\u306b\u3088\u308axxx\u3067\u6307\u5b9a\u3057\u305f\u30c6\u30fc\u30de\u3067\u8868\u793a\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 \u307e\u305a\u3001URL\u306b\u3064\u3044\u3066\u3067\u3059\u304c\u3001\u901a\u5e38\u306f\u30b5\u30a4\u30c8\u30a2\u30c9\u30ec\u30b9\uff08URL\uff09\u306b\u6307 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[7],"class_list":["clearfix","post-34","post","type-post","status-publish","format-standard","hentry","category-14","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34"}],"version-history":[{"count":3,"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":77,"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions\/77"}],"wp:attachment":[{"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/r-side.net\/kw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}