{"id":396,"date":"2011-08-15T19:17:26","date_gmt":"2011-08-15T10:17:26","guid":{"rendered":"http:\/\/takanix.com\/?p=396"},"modified":"2011-08-15T19:20:05","modified_gmt":"2011-08-15T10:20:05","slug":"%e3%80%90htaccess%e3%80%91%e3%82%88%e3%81%8f%e4%bd%bf%e3%81%86htaccess%e9%9b%86","status":"publish","type":"post","link":"https:\/\/takanix.com\/?p=396","title":{"rendered":"\u3010htaccess\u3011\u3088\u304f\u4f7f\u3046htaccess\u96c6"},"content":{"rendered":"<p>\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u3001\u50d5\u304c\u3088\u304f\u4f7f\u3063\u3066\u3044\u308b\u300chtaccess\u300d\u3092\u96c6\u3081\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u4f7f\u3044\u65b9\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u300c.htaccess\u300d\u306b\u3059\u308b\u3002<br \/>\n\u30d5\u30a1\u30a4\u30eb\u5185\u306b\u4e00\u884c\u305a\u3064\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30101\u3011 IP\u30a2\u30c9\u30ec\u30b9\u5236\u9650<\/p>\n<p>\u30c6\u30b9\u30c8\u30b5\u30a4\u30c8\u306a\u3069\u81ea\u793e\u306eIP\u30a2\u30c9\u30ec\u30b9\u306e\u307f\u3067\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3044\u5834\u5408\u306f\u3002<br \/>\n\u300c<br \/>\norder deny,allow<br \/>\ndeny from all<br \/>\nallow from xxx.xxx.xx.xxx<br \/>\n\u300d<\/p>\n<p>\u7279\u5b9a\u306eIP\u30a2\u30c9\u30ec\u30b9\u3092\u62d2\u5426\u3057\u305f\u3044\u5834\u5408\u306f\u3002<br \/>\n\u300c<br \/>\norder deny,allow<br \/>\nallow from all<br \/>\ndeny from aaa.aaa.aa.aaa<br \/>\n\u300d<\/p>\n<p>\u8ffd\u52a0\u3067\u4f55\u500b\u8ffd\u52a0\u3057\u3066\u3082\u5927\u4e08\u592b\u3002\u300c\u300d\u5185\u3092\u300chtaccess\u300d\u306b\u5165\u529b\u3057\u3066\u306d\u3002<\/p>\n<p>\u300c<br \/>\norder deny,allow<br \/>\nallow from all<br \/>\ndeny from aaa.aaa.aa.aaa<br \/>\ndeny from xxx.xxx.xx.xxx<br \/>\n\u300d<\/p>\n<p><a href=\"http:\/\/www.explowd.co.jp\/laboratory\/#hta_pos\" target=\"_blank\">IP\u5236\u9650\u306f\u3001\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30c9\uff65\u30e9\u30dc\u3067\u3082\u63d0\u4f9b\u4e2d\u3002<\/a><\/p>\n<p>\u30102\u3011index.html \u4ee5\u5916\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u3059\u308b<\/p>\n<p>\u300c<br \/>\nDirectoryIndex index.html index.htm index.php<br \/>\n\u300d<\/p>\n<p>\u30103\u3011\u30b5\u30fc\u30d0\u30fc\u306b\u3088\u3063\u3066\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u5185\u5bb9\u4e00\u89a7\u53c2\u7167\u304c\u51fa\u6765\u3066\u3057\u307e\u3046\u306e\u3092\u975e\u8868\u793a\u306b\u3059\u308b<br \/>\nDirectoryIndex\u306b\u3001.ht\u3092\u6700\u5f8c\u306b\u4ed8\u3051\u308b\u3002<br \/>\n\u300c<br \/>\nDirectoryIndex index.html .ht<br \/>\n<span style=\"font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;\">\u300d <\/span><\/p>\n<p>\u30104\u3011URL\u306b\u300cwww\u300d\u3092\u5fc5\u305a\u4ed8\u3051\u3066\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3002<br \/>\n\u300c<br \/>\nRewriteEngine On<br \/>\nRewriteCond %{HTTP_HOST} ^test\\.comRewriteRule (.*) http:\/\/www.test.com\/$1 [R=301,L]<br \/>\n\u300d<br \/>\ntest\\.com\u3092www\\.test\\.com\u306b\u5165\u308c\u66ff\u3048\u3066\u3001http:\/\/www.test.com\/\u3092http:\/\/test.com\/\u306b\u3059\u308c\u3070\u9006\u306b\u306a\u308b\u3002<\/p>\n<p>\u30105\u3011PC\u3068\u643a\u5e2f\u632f\u308a\u5206\u3051<br \/>\n\u300c<br \/>\nRewriteEngine On<br \/>\nRewriteCond %{HTTP_USER_AGENT} ^(DoCoMo|KDDI|DDIPOKET|UP.Browser|J-PHONE|Vodafone|SoftBank)<br \/>\nRewriteRule ^$ http:\/\/mobile.test.com\/ [R]<br \/>\n\u300d<\/p>\n<p>\u30106\u3011\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5bb9\u91cf\u306e\u5909\u66f4<br \/>\nphp.ini\u3067\u5909\u66f4\u3059\u308b\u304c\u3001\u30b5\u30fc\u30d0\u30fc\u306b\u3088\u3063\u3066\u51fa\u6765\u306a\u3044\u5834\u5408\u306fhtaccess\u3067\u3002\u4ee5\u4e0b\u306f50MB\u306b\u8a2d\u5b9a\u3002<br \/>\n\u300c<br \/>\nphp_value upload_max_filesize 50M<br \/>\nphp_value post_max_size 50M<br \/>\n\u300d<\/p>\n<p>\u30107\u3011\u643a\u5e2f\u30b5\u30a4\u30c8\u3092xhtml\u3067\u4f5c\u3063\u305f\u5834\u5408<br \/>\n\u4e0b\u8a18TYPE\u3092\u8ffd\u52a0\u3059\u308c\u3070\u3001xhtml\u30e2\u30fc\u30c9\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3002<br \/>\n\u300c<br \/>\nAddType application\/xhtml+xml .html<br \/>\n\u300d<\/p>\n<p>\u30108\u3011\u30d9\u30fc\u30b7\u30c3\u30af\u8a8d\u8a3c<br \/>\n\u300c<br \/>\nAuthType Basic<br \/>\nAuthName &#8220;Input your ID and Password.&#8221;<br \/>\nAuthUserFile \/home\/test.com\/admin\/.htpasswd<br \/>\nrequire valid-user<br \/>\n\u300d<\/p>\n<p>\u203bAuthentication for phpMyAdmin\u306f\u3001\u753b\u9762\u4e0a\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u3059\u3002<br \/>\nAuthUserFile \/home\/test.com\/admin\/.htpasswd\u3000\u3067\u3001\u300c.htpasswd\u300d\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n\/home\/test.com\/admin\/\u306f\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u3002<\/p>\n<p>.htpasswd\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a18\u8ff0<br \/>\n\u300c<br \/>\ncs112190399:5lfCZfYm0yQVU<br \/>\n\u300d<br \/>\n\u8907\u6570\u4eba\u3067\u884c\u3046\u5834\u5408\u30012\u884c\u76ee\u30013\u884c\u76ee\u3068\u7d9a\u3051\u308b\u3002<br \/>\n\u30d1\u30b9\u30ef\u30fc\u30c9\u306f\u30a8\u30f3\u30b3\u30fc\u30c9\u3059\u308b\u3002<\/p>\n<p><a href=\"http:\/\/www.explowd.co.jp\/laboratory\/#hta_pass\" target=\"_blank\">\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u30a8\u30f3\u30b3\u30fc\u30c9\u306f\u3001\u30a8\u30af\u30b9\u30d7\u30ed\u30fc\u30c9\uff65\u30e9\u30dc\u3067\u3082\u63d0\u4f9b\u4e2d\u3002<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b5\u30fc\u30d0\u30fc\u3092\u8a2d\u5b9a\u3059\u308b\u969b\u306b\u3001\u50d5\u304c\u3088\u304f\u4f7f\u3063\u3066\u3044\u308b\u300chtaccess\u300d\u3092\u96c6\u3081\u3066\u307f\u307e\u3057\u305f\u3002 \u3061\u306a\u307f\u306b\u3001\u4f7f\u3044\u65b9\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u4e0a\u3067\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u300c.htaccess\u300d\u306b\u3059\u308b\u3002 \u30d5\u30a1\u30a4\u30eb\u5185\u306b\u4e00\u884c\u305a\u3064\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002 \u30101\u3011 IP\u30a2\u30c9\u30ec\u30b9\u5236\u9650 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":""},"categories":[223],"tags":[607,224,228,226,229,225,227],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts\/396"}],"collection":[{"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=396"}],"version-history":[{"count":4,"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":401,"href":"https:\/\/takanix.com\/index.php?rest_route=\/wp\/v2\/posts\/396\/revisions\/401"}],"wp:attachment":[{"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/takanix.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}