github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/howto/htaccess.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>Apache チュートリアル: .htaccess ファイル - 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/howto/htaccess.html" rel="canonical" /></head>
    18  <body id="manual-page"><div id="page-header">
    19  <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>
    20  <p class="apache">Apache HTTP サーバ バージョン 2.2</p>
    21  <img alt="" src="../images/feather.gif" /></div>
    22  <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
    23  <div id="path">
    24  <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="./">How-To / チュートリアル</a></div><div id="page-content"><div class="retired"><h4>Please note</h4>
    25              <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>
    26          <p>You may follow <a href="http://httpd.apache.org/docs/current/howto/htaccess.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache チュートリアル: .htaccess ファイル</h1>
    27  <div class="toplang">
    28  <p><span>翻訳済み言語: </span><a href="../en/howto/htaccess.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
    29  <a href="../fr/howto/htaccess.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
    30  <a href="../ja/howto/htaccess.html" title="Japanese">&nbsp;ja&nbsp;</a> |
    31  <a href="../ko/howto/htaccess.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
    32  <a href="../pt-br/howto/htaccess.html" hreflang="pt-br" rel="alternate" title="Português (Brasil)">&nbsp;pt-br&nbsp;</a></p>
    33  </div>
    34  <div class="outofdate">この日本語訳はすでに古くなっている
    35              可能性があります。
    36              最近更新された内容を見るには英語版をご覧下さい。
    37          </div>
    38  
    39  <p><code>.htaccess</code> ファイルはディレクトリ毎に設定を変更する方法を
    40  提供します。</p>
    41  </div>
    42  <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#related">.htaccess ファイル</a></li>
    43  <li><img alt="" src="../images/down.gif" /> <a href="#what">.htaccess ファイルとは何か/その使い方</a></li>
    44  <li><img alt="" src="../images/down.gif" /> <a href="#when">いつ .htaccess ファイルを使う(使わない)か。</a></li>
    45  <li><img alt="" src="../images/down.gif" /> <a href="#how">ディレクティブの適用のされ方</a></li>
    46  <li><img alt="" src="../images/down.gif" /> <a href="#auth">認証の例</a></li>
    47  <li><img alt="" src="../images/down.gif" /> <a href="#ssi">SSI の例</a></li>
    48  <li><img alt="" src="../images/down.gif" /> <a href="#cgi">CGI の例</a></li>
    49  <li><img alt="" src="../images/down.gif" /> <a href="#troubleshoot">問題解決</a></li>
    50  </ul><ul class="seealso"><li><a href="#comments_section">コメント</a></li></ul></div>
    51  <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
    52  <div class="section">
    53  <h2><a name="related" id="related">.htaccess ファイル</a></h2>
    54      <table class="related"><tr><th>関連モジュール</th><th>関連ディレクティブ</th></tr><tr><td><ul><li><code class="module"><a href="../mod/core.html">core</a></code></li><li><code class="module"><a href="../mod/mod_authn_file.html">mod_authn_file</a></code></li><li><code class="module"><a href="../mod/mod_authz_groupfile.html">mod_authz_groupfile</a></code></li><li><code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code></li><li><code class="module"><a href="../mod/mod_include.html">mod_include</a></code></li><li><code class="module"><a href="../mod/mod_mime.html">mod_mime</a></code></li></ul></td><td><ul><li><code class="directive"><a href="../mod/core.html#accessfilename">AccessFileName</a></code></li><li><code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code></li><li><code class="directive"><a href="../mod/core.html#options">Options</a></code></li><li><code class="directive"><a href="../mod/mod_mime.html#addhandler">AddHandler</a></code></li><li><code class="directive"><a href="../mod/core.html#sethandler">SetHandler</a></code></li><li><code class="directive"><a href="../mod/core.html#authtype">AuthType</a></code></li><li><code class="directive"><a href="../mod/core.html#authname">AuthName</a></code></li><li><code class="directive"><a href="../mod/mod_authn_file.html#authuserfile">AuthUserFile</a></code></li><li><code class="directive"><a href="../mod/mod_authz_groupfile.html#authgroupfile">AuthGroupFile</a></code></li><li><code class="directive"><a href="../mod/core.html#require">Require</a></code></li></ul></td></tr></table>
    55  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
    56  <div class="section">
    57  <h2><a name="what" id="what">.htaccess ファイルとは何か/その使い方</a></h2>
    58  
    59  
    60      <p><code>.htaccess</code> ファイル (「分散設定ファイル」) は
    61      ディレクトリ毎に設定を変更する方法を提供します。ディレクティブの
    62      書かれたファイルをディレクトリに置くことで、そのディレクトリとその
    63      サブディレクトリすべてにディレクティブを適用させることができます。</p>
    64  
    65      <div class="note"><h3>注:</h3>
    66        <p><code>.htaccess</code> ファイルを別の名前にしたい場合は、
    67        <code class="directive"><a href="../mod/core.html#accessfilename">AccessFileName</a></code> ディレクティブを
    68        使って変更することができます。例えば、そのファイルを <code>.config</code> 
    69        という名前にしたい場合は、以下の設定をサーバ設定ファイルに入れることが
    70        できます:</p>
    71  
    72        <div class="example"><p><code>
    73          AccessFileName .config
    74        </code></p></div>
    75      </div>
    76  
    77      <p>一般に、<code>.htaccess</code> ファイルの構文は
    78      <a href="../configuring.html#syntax">主設定ファイル</a>
    79      と同じです。これらのファイルに書くことのできるディレクティブは <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> ディレクティブにより決まります。
    80      このディレクティブは、<code>.htaccess</code> ファイルに
    81      書かれたディレクティブの中で、、
    82      どのディレクティブが適用されるかをカテゴリー単位で指定します。
    83      <code>.htaccess</code> に書くことのできるディレクティブであれば、
    84      説明文書には「上書き」という項目があり、.htaccess に書くことができるように
    85      なるための <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> の値が指定されています。</p>
    86  
    87      <p>例えば、<code class="directive"><a href="../mod/core.html#adddefaultcharset">AddDefaultCharset</a></code> ディレクティブの説明を
    88      見ると、<code>.htaccess</code> ファイルでの使用が許可されていることが
    89      わかります。 (ディレクティブの概要の所にある「コンテキスト」と書かれている
    90      行を見てください。) <a href="../mod/directive-dict.html#Context">上書き</a>と書かれている行には
    91      <code>FileInfo</code> とあります。ですから、<code>.htaccess</code> 中の
    92      このディレクティブが有効になるためには、少なくとも
    93      <code>AllowOverride FileInfo</code> が設定されている必要があります。</p>
    94  
    95      <div class="example"><h3>例:</h3><table>
    96          <tr>
    97            <td><a href="../mod/directive-dict.html#Context">コンテキスト:</a></td>
    98            <td>サーバ設定ファイル,バーチャルホスト,ディレクトリ,.htaccess</td>
    99          </tr>
   100  
   101          <tr>
   102            <td><a href="../mod/directive-dict.html#Override">上書き:</a></td>
   103            <td>FileInfo</td>
   104          </tr>
   105        </table></div>
   106  
   107      <p>あるディレクティブを <code>.htaccess</code> ファイルに書くことができるか
   108      どうかわからないときは、そのディレクティブの説明を探して、".htaccess"
   109      のための「コンテキスト」の行を調べてください。</p>
   110      </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   111  <div class="section">
   112  <h2><a name="when" id="when">いつ .htaccess ファイルを使う(使わない)か。</a></h2>
   113  
   114      <p>一般的に、サーバの主設定ファイルにアクセスできない場合を除いて、
   115      <code>.htaccess</code> ファイルの使用は極力避けてください。
   116      世の中には、例えば、ユーザ認証は常に <code>.htaccess</code> ファイルで
   117      行なわなければならない、という誤解が広まっていますが、まったくそんなことは
   118      ありません。ユーザ認証の設定はサーバ主設定ファイルに書くことができ、
   119      実際、その方がより良い設定方法です。</p>
   120  
   121      <p><code>.htaccess</code> ファイルはコンテンツ提供者がディレクトリ毎の
   122      設定を行ないたいけれど、サーバシステムの root アクセス権限を持っていない
   123      という場合にのみ使うべきものです。サーバ管理者が頻繁に設定変更を行ないたくは
   124      ない、というときには個々のユーザが <code>.htaccess</code> ファイルを使って
   125      自分で設定の変更を行なうことを許可した方が良いときもあるでしょう。
   126      これは特に、ISP が複数のユーザのサイトを一つのマシンでホストしていて、
   127      各ユーザが設定の変更をできるようにしたいようなときにあてはまります。</p>
   128  
   129      <p>しかし、普通は可能であれば <code>.htaccess</code> ファイルの使用は
   130      避けてください。<code>.htaccess</code> ファイルに書こうと考えるような
   131      すべての設定は、サーバの主設定ファイルの <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> セクションで同じように行なうことが
   132      できます。</p>
   133  
   134      <p><code>.htaccess</code> ファイルの使用を避ける理由は主に二つあります。</p>
   135  
   136      <p>一つ目はサーバの性能の問題です。<code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> ディレクティブが
   137      <code>.htaccess</code> ファイルの設定を許可している場合は、Apache は
   138      各ディレクトリで <code>.htaccess</code> ファイルを探します。
   139      ですから、<code>.htaccess</code> ファイルを許可すると、実際に使用しているか
   140      どうかに関わらず、性能の低下を招くことになります! また、<code>.htaccess</code>
   141      ファイルは文書がリクエストされる度に読み込まれます。</p>
   142  
   143      <p>さらに、Apache は適用すべきディレクティブを集めるために、すべての
   144      上位のディレクトリの <code>.htaccess</code> ファイルを探す必要があることにも
   145      注意してください。(<a href="#how">ディレクティブが適用される方法</a>を
   146      参照してください。)ですから、<code>/www/htdocs/example</code> にある
   147      ファイルがリクエストされたときは、Apache は以下のファイルを調べます。</p>
   148  
   149      <div class="example"><p><code>
   150        /.htaccess<br />
   151        /www/.htaccess<br />
   152        /www/htdocs/.htaccess<br />
   153        /www/htdocs/example/.htaccess
   154      </code></p></div>
   155  
   156      <p>ですから、そのディレクトリのそれぞれのファイルへのアクセスに対して、
   157      上の例のファイルがまったく存在しないときでも、追加のファイルシステムの
   158      アクセスが行なわれることになります。(これは、<code>.htaccess</code> が
   159      <code>/</code> に対して有効になっているときの場合で、普通はそうなって
   160      いないことに注意してください。)</p>
   161  
   162      <p>二つ目はセキュリティです。ユーザにサーバの設定を変更することを
   163      許可することになりますので、あなた自身が管理できない変更をされる
   164      恐れがあります。ユーザにこの特権を与えるのが良いのかどうか、十分
   165      検討してください。また、ユーザに与える権限が必要なものよりも少なすぎると、
   166      余分な技術サポート報告を受け取るようになる可能性が高いことにも
   167      注意してください。確実に、ユーザにどの程度の権限を与えたか明確に告げるように
   168      してください。<code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> に
   169      何を設定したかということと、関連する文書を示すことで、
   170      後々の混乱をぐっと減らすことが
   171      できます。</p>
   172  
   173      <p>ところで、ディレクティブの書かれた <code>.htaccess</code> を
   174      <code>/www/htdocs/example</code> に置くことと、同じディレクティブを
   175      主サーバ設定の Directory セクション
   176      <code>&lt;Directory /www/htdocs/example&gt;</code> に書くことは
   177      完全に等価です:</p>
   178  
   179      <p><code>/www/htdocs/example</code> の <code>.htaccess</code> ファイル:</p>
   180  
   181      <div class="example"><h3><code>/www/htdocs/example</code> の .htaccess ファイルの
   182      内容</h3><p><code>
   183          AddType text/example .exm
   184      </code></p></div>
   185  
   186      <div class="example"><h3><code>httpd.conf のセクション</code>
   187      file</h3><p><code>
   188        &lt;Directory /www/htdocs/example&gt;<br />
   189        <span class="indent">
   190          AddType text/example .exm<br />
   191        </span>
   192        &lt;/Directory&gt;
   193      </code></p></div>
   194  
   195      <p>しかし、この設定はサーバ設定ファイルに書いた方がパフォーマンスの
   196      低下が少なくなります。ファイルがリクエストされる度に
   197      読み込まれる代わりに、Apache の起動時に 1 回だけ読み込めば
   198      よくなるからです。</p>
   199  
   200      <p><code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> ディレクティブの
   201      値を <code>none</code> に設定することで <code>.htaccess</code> ファイル
   202      の使用を完全に無効にすることができます。</p>
   203  
   204      <div class="example"><p><code>
   205        AllowOverride None
   206      </code></p></div>
   207  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   208  <div class="section">
   209  <h2><a name="how" id="how">ディレクティブの適用のされ方</a></h2>
   210  
   211      <p><code>.htaccess</code> ファイルの設定ディレクティブは <code>.htaccess</code>
   212      ファイルの存在するディレクトリと、そのサブディレクトリすべてに適用されます。
   213      しかし、上の階層のディレクトリにも <code>.htaccess</code> ファイルが
   214      存在するかもしれないことを覚えておくことは大切です。ディレクティブは現れる
   215      順番に適用されます。ですから、あるディレクトリの <code>.htaccess</code> は
   216      ディレクトリツリーのより上の階層の <code>.htaccess</code> ファイルの
   217      設定を上書きするかもしれません。そして、その <code>.htaccess</code> も
   218      より上の階層で書かれたディレクティブを上書きしたり、主サーバ設定ファイル
   219      そのものの設定を上書きしたりしているかもしれません。</p>
   220  
   221      <p>例:</p>
   222  
   223      <p>ディレクトリ <code>/www/htdocs/example1</code> に以下の内容の
   224      <code>.htaccess</code> ファイルがあります:</p>
   225  
   226      <div class="example"><p><code>
   227         Options +ExecCGI
   228      </code></p></div>
   229  
   230      <p>(注: <code>.htaccess</code>
   231      ファイルで "<code class="directive"><a href="../mod/core.html#options">Options</a></code>" ディレクティブが有効になるためには、
   232      "<code>AllowOverride Options</code>" を有効にする必要があります。)</p>
   233  
   234      <p>ディレクトリ <code>/www/htdocs/example1/example2</code> には
   235      以下のような <code>.htaccess</code> ファイルがあります:</p>
   236  
   237      <div class="example"><p><code>
   238         Options Includes
   239      </code></p></div>
   240  
   241      <p>二つめの <code>.htaccess</code> により、ディレクトリ
   242      <code>/www/htdocs/example1/example2</code> では CGI の実行は
   243      許可されません。これは、<code>Options Includes</code> のみが
   244      効力を持ち、それがすべての以前の設定を上書きするからです。</p>
   245  
   246      <h3><a name="merge" id="merge">メイン設定ファイルに対する
   247      .htaccess のマージ</a></h3>
   248  
   249      <p>As discussed in the documentation on <a href="../sections.html">Configuration Sections</a>,
   250      <code>.htaccess</code> files can override the <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> sections for
   251      the corresponding directory, but will be overriden by other types
   252      of configuration sections from the main configuration files.  This
   253      fact can be used to enforce certain configurations, even in the
   254      presence of a liberal <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> setting.  For example, to
   255      prevent script execution while allowing anything else to be set in
   256      <code>.htaccess</code> you can use:</p>
   257      <p><a href="../sections.html">セクションの設定</a>
   258      に記載されているように、<code>.htaccess</code> ファイルを使って
   259      <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code>
   260      セクションの設定をディレクトリ毎に上書きできますが、
   261      メイン設定ファイル中にある、他の種類の設定セクションによって
   262      さらに上書きされることもあります。
   263      この特徴を使って、
   264      <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code>
   265      で自由度の高い設定があったとしても、ある特定の設定が確実に
   266      反映されるようにできます。例えば、CGI スクリプトの実行は
   267      不許可に、かつ、<code>.htaccess</code> でその他の項目は
   268      設定できるように、という場合は次のようにできます :</p>
   269      
   270      <div class="example"><p><code>
   271  &lt;Directory /&gt;<br />
   272  <span class="indent">
   273  Allowoverride All<br />
   274  </span>
   275  &lt;/Directory&gt;<br />
   276  <br />
   277  &lt;Location /&gt;<br />
   278  <span class="indent">
   279  Options +IncludesNoExec -ExecCGI<br />
   280  </span>
   281  &lt;/Location&gt;
   282      </code></p></div>
   283  
   284  
   285  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   286  <div class="section">
   287  <h2><a name="auth" id="auth">認証の例</a></h2>
   288  
   289      <p>もし認証の方法を知るためにこの部分に直接来たのであれば、次のことを
   290      知っておくことが重要です。よくある誤解に、パスワード認証を行なうためには
   291      <code>.htaccess</code> ファイルを使う必要がある、というものがあります。
   292      これは正しくありません。主サーバ設定ファイルの <code class="directive"><a href="../mod/core.html#directory">&lt;Directory&gt;</a></code> セクションに
   293      認証用のディレクティブを書く方が推奨される方法で、<code>.htaccess</code>
   294      ファイルは主サーバ設定ファイルを変更できないときにのみ使用すべきです。
   295      いつ <code>.htaccess</code> ファイルを使うべきで、いつ使うべきではないかに
   296      ついては <a href="#when">上</a>を参照してください。</p>
   297  
   298      <p>以上のことをふまえた上で、もし <code>.htaccess</code> の使用が
   299      まだ必要だと思う場合は、次のようなものが望みのことをしてくれるかも
   300      しれません。</p>
   301  
   302      <p><code>.htaccess</code> ファイルの内容:</p>
   303  
   304      <div class="example"><p><code>
   305        AuthType Basic<br />
   306        AuthName "Password Required"<br />
   307        AuthUserFile /www/passwords/password.file<br />
   308        AuthGroupFile /www/passwords/group.file<br />
   309        Require Group admins
   310      </code></p></div>
   311  
   312      <p>これらのディレクティブが有効になるためには、
   313      <code>AllowOverride AuthConfig</code> が有効でなくてはならないことに
   314      注意してください。</p>
   315  
   316      <p>認証と承認については <a href="auth.html">認証チュートリアル</a>を
   317      参照してください。</p>
   318  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   319  <div class="section">
   320  <h2><a name="ssi" id="ssi">SSI の例</a></h2>
   321  
   322      <p>もう一つの <code>.htaccess</code> ファイルのよくある利用法は
   323      特定のディレクトリで SSI を有効にすることです。これは、望みのディレクトリの
   324      <code>.htaccess</code> ファイルに以下の設定ディレクティブを書くことで
   325      達成できます:</p>
   326  
   327      <div class="example"><p><code>
   328         Options +Includes<br />
   329         AddType text/html shtml<br />
   330         AddHandler server-parsed shtml
   331      </code></p></div>
   332  
   333      <p>これらのディレクティブが有効になるためには、
   334      <code>AllowOverride Options</code> と <code>AllowOverride
   335      FileInfo</code> が有効になっている必要があることに注意してください。</p>
   336  
   337      <p>よりまとまった SSI の説明は <a href="ssi.html">SSI チュートリアル</a>を
   338      参照してください。</p>
   339  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   340  <div class="section">
   341  <h2><a name="cgi" id="cgi">CGI の例</a></h2>
   342  
   343      <p>最後に、特定のディレクトリで CGI プログラムの実行を許可したいことが
   344      あるでしょう。これは以下の設定で行なうことができます:</p>
   345  
   346      <div class="example"><p><code>
   347         Options +ExecCGI<br />
   348         AddHandler cgi-script cgi pl
   349      </code></p></div>
   350  
   351      <p>もしくは、あるディレクトリのすべてのファイルが CGI プログラムと
   352      みなされるようにしたいなら、以下の設定で実現することができます:</p>
   353  
   354      <div class="example"><p><code>
   355         Options +ExecCGI<br />
   356         SetHandler cgi-script
   357      </code></p></div>
   358  
   359      <p>これらのディレクティブが有効になるためには、
   360      <code>AllowOverride Options</code> と <code>AllowOverride
   361      FileInfo</code> が有効である必要があることに注意してください。</p>
   362  
   363      <p>CGI プログラムと設定のよりまとまった説明は <a href="cgi.html">CGI チュートリアル</a>を参照してください。</p>
   364  
   365  </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
   366  <div class="section">
   367  <h2><a name="troubleshoot" id="troubleshoot">問題解決</a></h2>
   368  
   369      <p>設定ディレクティブを <code>.htaccess</code> ファイルに書いたけれども、
   370      期待した効果が得られないときには、いくつかの原因が考えられます。</p>
   371  
   372      <p>一番よくあることは、設定ディレクティブが考慮されるようには
   373      <code class="directive"><a href="../mod/core.html#allowoverride">AllowOverride</a></code> が設定されていない
   374      というものです。該当のファイルのスコープに <code>AllowOverride None</code>
   375      が設定されていないことを確認してください。これを調べるための良い方法は、
   376      <code>.htaccess</code> ファイルにごみを書いて、リロードすることです。
   377      サーバのエラーが生成されないときは、ほぼ確実に <code>AllowOverride
   378      None</code> が設定されている状態になっています。</p>
   379  
   380      <p>そうではなく、文書をアクセスしようとしたときにエラーが発生している
   381      ときは、Apache のエラーログを調べてください。<code>.htaccess</code> ファイルで
   382      使用されたディレクティブが許可されていない、ということを知らせている
   383      可能性が高いです。または、構文の間違いがあることを述べているかもしれません。
   384      その場合にはまずそれを修正する必要があります。</p>
   385  
   386  </div></div>
   387  <div class="bottomlang">
   388  <p><span>翻訳済み言語: </span><a href="../en/howto/htaccess.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
   389  <a href="../fr/howto/htaccess.html" hreflang="fr" rel="alternate" title="Français">&nbsp;fr&nbsp;</a> |
   390  <a href="../ja/howto/htaccess.html" title="Japanese">&nbsp;ja&nbsp;</a> |
   391  <a href="../ko/howto/htaccess.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
   392  <a href="../pt-br/howto/htaccess.html" hreflang="pt-br" rel="alternate" title="Português (Brasil)">&nbsp;pt-br&nbsp;</a></p>
   393  </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>
   394  <script type="text/javascript"><!--//--><![CDATA[//><!--
   395  var comments_shortname = 'httpd';
   396  var comments_identifier = 'http://httpd.apache.org/docs/2.2/howto/htaccess.html';
   397  (function(w, d) {
   398      if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
   399          d.write('<div id="comments_thread"><\/div>');
   400          var s = d.createElement('script');
   401          s.type = 'text/javascript';
   402          s.async = true;
   403          s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
   404          (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
   405      }
   406      else { 
   407          d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
   408      }
   409  })(window, document);
   410  //--><!]]></script></div><div id="footer">
   411  <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>
   412  <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[//><!--
   413  if (typeof(prettyPrint) !== 'undefined') {
   414      prettyPrint();
   415  }
   416  //--><!]]></script>
   417  </body></html>