]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_dir.html.ja.utf8
rebuild mod pages.
[apache] / docs / manual / mod / mod_dir.html.ja.utf8
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_dir - Apache HTTP サーバ</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" />
12 <script src="../style/scripts/prettify.js" type="text/javascript">
13 </script>
14
15 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
16 <body>
17 <div id="page-header">
18 <p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
19 <p class="apache">Apache HTTP サーバ バージョン 2.4</p>
20 <img alt="" src="../images/feather.gif" /></div>
21 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
22 <div id="path">
23 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.4</a> &gt; <a href="./">モジュール</a></div>
24 <div id="page-content">
25 <div id="preamble"><h1>Apache モジュール mod_dir</h1>
26 <div class="toplang">
27 <p><span>翻訳済み言語: </span><a href="../en/mod/mod_dir.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
28 <a href="../fr/mod/mod_dir.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
29 <a href="../ja/mod/mod_dir.html" title="Japanese">&nbsp;ja&nbsp;</a> |
30 <a href="../ko/mod/mod_dir.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
31 <a href="../tr/mod/mod_dir.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
32 </div>
33 <div class="outofdate">この日本語訳はすでに古くなっている
34             可能性があります。
35             最近更新された内容を見るには英語版をご覧下さい。
36         </div>
37 <table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>「最後のスラッシュ」のリダイレクトと、ディレクトリの
38 インデックスファイルを扱う機能を提供する</td></tr>
39 <tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
40 <tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>dir_module</td></tr>
41 <tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_dir.c</td></tr></table>
42 <h3>概要</h3>
43
44     <p>ディレクトリインデックスは、次の二つのうちどちらかが利用されます:</p>
45
46     <ul>
47       <li>一つ目は、ユーザが作成したファイルを用いるもので、通常
48       <code>index.html</code> というファイル名を使います。このファイル名は、
49       <code class="directive"><a href="#directoryindex">DirectoryIndex</a></code> ディレクティブで
50       指定することができます。この機能は <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>
51       モジュールで提供されます。</li>
52
53       <li>もう一つの方法は、
54       サーバによって自動的に生成されるディレクトリリストを用いる場合です。
55       この機能は、<code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code>
56       モジュールにより提供されます。</li>
57     </ul>
58
59     <p>自動的なインデックス生成機能を削除 (もしくは交換)
60     できるように、この二つの機能は分離されています。</p>
61
62     <p>なお <code>http://servername/foo/dirname</code> という URL
63     へのリクエストがあった際に、<code>dirname</code>
64     というディレクトリがあれば、「最後にスラッシュをつけた形」の URL
65     へのリダイレクトを送出します。
66     ディレクトリへのアクセスはスラッシュで終わっている必要があり、
67     <code>mod_dir</code> は、<code>http://servername/foo/dirname/</code>
68     へのリダイレクトを送出することになります。</p>
69 </div>
70 <div id="quickview"><h3 class="directives">ディレクティブ</h3>
71 <ul id="toc">
72 <li><img alt="" src="../images/down.gif" /> <a href="#directoryindex">DirectoryIndex</a></li>
73 <li><img alt="" src="../images/down.gif" /> <a href="#directoryindexredirect">DirectoryIndexRedirect</a></li>
74 <li><img alt="" src="../images/down.gif" /> <a href="#directoryslash">DirectorySlash</a></li>
75 <li><img alt="" src="../images/down.gif" /> <a href="#fallbackresource">FallbackResource</a></li>
76 </ul>
77 <ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
78
79 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
80 <div class="directive-section"><h2><a name="DirectoryIndex" id="DirectoryIndex">DirectoryIndex</a> <a name="directoryindex" id="directoryindex">ディレクティブ</a></h2>
81 <table class="directive">
82 <tr><th><a href="directive-dict.html#Description">説明:</a></th><td>クライアントがディレクトリをリクエストしたときに調べる
83 リソースのリスト</td></tr>
84 <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DirectoryIndex
85     <var>local-url</var> [<var>local-url</var>] ...</code></td></tr>
86 <tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DirectoryIndex index.html</code></td></tr>
87 <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
88 <tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Indexes</td></tr>
89 <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
90 <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_dir</td></tr>
91 </table>
92     <p>
93     クライアントが、ディレクトリ名の最後に「/」
94     を指定してディレクトリインデックスを要求する場合に探すリソースのリストを
95     <code class="directive">DirectoryIndex</code> ディレクティブで設定します。
96     <var>Local-url</var>
97     は、リクエストされたディレクトリに対応する、サーバ上のドキュメントの
98     (% エンコードされた) URL で、普通はディレクトリ中のファイルの名前です。
99     複数の URL が設定された場合には、最初に見つかったものを返します。
100     それらが見つからず、<code>Indexes</code>
101     オプションがセットされている場合、ディレクトリのリストを生成します。
102     </p>
103
104     <div class="example"><h3>例</h3><p><code>
105       DirectoryIndex index.html
106     </code></p></div>
107
108     <p><code>http://myserver/docs/</code> へのアクセスがあり、
109     <code>http://myserver/docs/index.html</code>
110     が存在すれば、この URL が返されます。
111     もし存在しなければ、ディレクトリのリストが返されます。</p>
112
113     <p>注: ドキュメントが同じディレクトリ内に存在するは必要ありません。
114     </p>
115
116     <div class="example"><p><code>
117       DirectoryIndex index.html index.txt  /cgi-bin/index.pl
118     </code></p></div>
119
120     <p>とした場合、<code>index.html</code> と <code>index.txt</code>
121     のどちらもディレクトリ内に存在しない場合、CGI スクリプト
122     <code>/cgi-bin/index.pl</code> が実行されます。</p>
123
124 </div>
125 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
126 <div class="directive-section"><h2><a name="DirectoryIndexRedirect" id="DirectoryIndexRedirect">DirectoryIndexRedirect</a> <a name="directoryindexredirect" id="directoryindexredirect">ディレクティブ</a></h2>
127 <table class="directive">
128 <tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Configures an external redirect for directory indexes.
129 </td></tr>
130 <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DirectoryIndexRedirect on | off | permanent | temp | seeother |
131 <var>3xx-code</var>
132 </code></td></tr>
133 <tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DirectoryIndexRedirect off</code></td></tr>
134 <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
135 <tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Indexes</td></tr>
136 <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
137 <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_dir</td></tr>
138 <tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>Available in version 2.3.14 and later</td></tr>
139 </table><p>このディレクティブの解説文書は
140             まだ翻訳されていません。英語版をご覧ください。
141             </p></div>
142 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
143 <div class="directive-section"><h2><a name="DirectorySlash" id="DirectorySlash">DirectorySlash</a> <a name="directoryslash" id="directoryslash">ディレクティブ</a></h2>
144 <table class="directive">
145 <tr><th><a href="directive-dict.html#Description">説明:</a></th><td>パス末尾のスラッシュでリダイレクトするかどうかのオンオフをトグルさせる</td></tr>
146 <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>DirectorySlash On|Off</code></td></tr>
147 <tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>DirectorySlash On</code></td></tr>
148 <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
149 <tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>Indexes</td></tr>
150 <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
151 <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_dir</td></tr>
152 <tr><th><a href="directive-dict.html#Compatibility">互換性:</a></th><td>2.0.51 以降</td></tr>
153 </table>
154     <p>要求のあった URL がディレクトリを指すかどうかを、
155     <code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code> が調整するべきかどうかを
156     <code class="directive">DirectorySlash</code>
157     ディレクティブで設定します。</p>
158
159     <p>典型的には、ユーザが末尾のスラッシュ無しでリソースへのリクエストを発行し、
160     そして、そのリソースがディレクトリを指していた場合、<code class="module"><a href="../mod/mod_dir.html">mod_dir</a></code>
161     は、末尾にスラッシュを<em>付加</em>した上で同じリソースにリダイレクトさせます。
162     この挙動には幾つか理由があります:</p>
163
164     <ul>
165     <li>ユーザは、最終的にはリソースの別名 URL をリクエストすることになる。</li>
166     <li><code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> が期待通りに動く。<code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> 
167     の生成するリンクはパスを出力しませんので、スラッシュがない場合は間違ったパスを
168     指してしまうことになります。</li>
169     <li><code class="directive"><a href="#directoryindex">DirectoryIndex</a></code> は、
170     末尾にスラッシュがついているリクエストについて<em>のみ</em>評価される。</li>
171     <li>HTML ページの相対 URL 参照が正しく動作する。</li>
172     </ul>
173
174     <p>とはいえ、もしこういった効果を望まない、かつ、
175     上記のような理由が当てはまらない場合は、リダイレクトを次のようにしてオフにできます:</p>
176
177     <div class="example"><p><code>
178         # see security warning below!<br />
179         &lt;Location /some/path&gt;<br />
180         <span class="indent">
181             DirectorySlash Off<br />
182             SetHandler some-handler<br />
183         </span>
184         &lt;/Location&gt;
185     </code></p></div>
186
187     <div class="warning"><h3>セキュリティ警告</h3>
188     <p>末尾のスラッシュでのリダイレクトをオフにすると、結果的に情報漏洩を
189     招くことになるかもしれません。
190     <code class="module"><a href="../mod/mod_autoindex.html">mod_autoindex</a></code> が有効 (<code>Options +Indexes</code>) で、
191     <code class="directive"><a href="#directoryindex">DirectoryIndex</a></code> が有効なリソース (例えば
192     <code>index.html</code>) を指していて、また、要求のあった URL に特別な
193     ハンドラが設定されていない場合を考えてみてください。
194     この場合末尾にスラッシュのついているリクエストに対しては <code>index.html</code>
195     ファイルが返されます。<strong>しかしスラッシュのないリクエストに対しては、
196     ディレクトリの内容一覧を返してしまいます。</strong></p>
197     </div>
198
199 </div>
200 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
201 <div class="directive-section"><h2><a name="FallbackResource" id="FallbackResource">FallbackResource</a> <a name="fallbackresource" id="fallbackresource">ディレクティブ</a></h2>
202 <table class="directive">
203 <tr><th><a href="directive-dict.html#Description">説明:</a></th><td>Define a default URL for requests that don't map to a file</td></tr>
204 <tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code /></td></tr>
205 <tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>サーバ設定ファイル, バーチャルホスト, ディレクトリ, .htaccess</td></tr>
206 <tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
207 <tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_dir</td></tr>
208 </table><p>Documentation not yet translated. Please see English version of document.</p>
209 </div>
210 </div>
211 <div class="bottomlang">
212 <p><span>翻訳済み言語: </span><a href="../en/mod/mod_dir.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
213 <a href="../fr/mod/mod_dir.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
214 <a href="../ja/mod/mod_dir.html" title="Japanese">&nbsp;ja&nbsp;</a> |
215 <a href="../ko/mod/mod_dir.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
216 <a href="../tr/mod/mod_dir.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
217 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">コメント</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
218 <script type="text/javascript"><!--//--><![CDATA[//><!--
219 var comments_shortname = 'httpd';
220 var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_dir.html';
221 (function(w, d) {
222     if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
223         d.write('<div id="comments_thread"><\/div>');
224         var s = d.createElement('script');
225         s.type = 'text/javascript';
226         s.async = true;
227         s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
228         (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
229     }
230     else { 
231         d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
232     }
233 })(window, document);
234 //--><!]]></script></div><div id="footer">
235 <p class="apache">Copyright 2012 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
236 <p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
237 if (typeof(prettyPrint) !== 'undefined') {
238     prettyPrint();
239 }
240 //--><!]]></script>
241 </body></html>