github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/mod/mod_dir.html.ja.utf8 (about)

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