1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
4 <!-- English Revision: 420993 -->
7 Licensed to the Apache Software Foundation (ASF) under one or more
8 contributor license agreements. See the NOTICE file distributed with
9 this work for additional information regarding copyright ownership.
10 The ASF licenses this file to You under the Apache License, Version 2.0
11 (the "License"); you may not use this file except in compliance with
12 the License. You may obtain a copy of the License at
14 http://www.apache.org/licenses/LICENSE-2.0
16 Unless required by applicable law or agreed to in writing, software
17 distributed under the License is distributed on an "AS IS" BASIS,
18 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 See the License for the specific language governing permissions and
20 limitations under the License.
23 <modulesynopsis metafile="mod_version.xml.meta">
24 <name>mod_version</name>
25 <description>バージョン依存の設定</description>
26 <status>Extension</status>
27 <sourcefile>mod_version.c</sourcefile>
28 <identifier>version_module</identifier>
29 <compatibility>バージョン 2.0.56 以降</compatibility>
32 <p>様々なバージョンの httpd の異なる設定を扱うことになる、
33 テストスイートや大規模ネットワークでの使用のために設計されています。
34 このモジュールは新しいコンテナ ― <directive
35 type="section" module="mod_version">IfVersion</directive> を
36 提供します。これを使うと、数字の比較や正規表現による柔軟な
37 バージョンチェックができるようになります。</p>
39 <example><title>例</title>
40 <IfVersion 2.1.0><br />
42 # current httpd version is exactly 2.1.0<br />
44 </IfVersion><br />
46 <IfVersion >= 2.2><br />
48 # use really new features :-)<br />
56 <directivesynopsis type="section">
57 <name>IfVersion</name>
58 <description>バージョン依存の設定を入れる</description>
59 <syntax><IfVersion [[!]<var>operator</var>] <var>version</var>> ...
60 </IfVersion></syntax>
61 <contextlist><context>server config</context><context>virtual host</context>
62 <context>directory</context><context>.htaccess</context></contextlist>
63 <override>All</override>
66 <p><directive type="section">IfVersion</directive> は <program>httpd</program> のバージョン
67 が基準を満たしたときにのみ実行させたいディレクティブを囲みます。
68 通常の (数値) 比較のときは <var>version</var> 引数は
69 <code><var>major</var>[.<var>minor</var>[.<var>patch</var>]]</code> という
70 形式、例えば、<code>2.1.0</code> や <code>2.2</code> となります。
71 <var>minor</var> と <var>patch</var> は省略可能です。省略された場合は、
72 0 を指定したものとみなされます。比較には次の数値 <var>operator</var> を
75 <table style="zebra" border="1">
76 <tr><th><var>operator</var></th><th>説明</th></tr>
77 <tr><td><code>=</code> と <code>==</code></td>
78 <td>同じ httpd バージョン</td></tr>
79 <tr><td><code>></code></td>
80 <td>より大きい httpd バージョン</td></tr>
81 <tr><td><code>>=</code></td>
82 <td>指定以上の httpd バージョン</td></tr>
83 <tr><td><code><</code></td>
84 <td>指定未満の httpd バージョン</td></tr>
85 <tr><td><code><=</code></td>
86 <td>指定以下の httpd バージョン</td></tr>
89 <example><title>例</title>
90 <IfVersion >= 2.1><br />
92 # this happens only in versions greater or<br />
98 <p>数値比較に加えて、http のバージョン番号に対して
99 <glossary ref="regex">正規表現</glossary>による
100 マッチングができます。二種類の書き方があります:</p>
102 <table style="zebra" border="1">
103 <tr><th><var>operator</var></th><th>説明</th></tr>
104 <tr><td><code>=</code> or <code>==</code></td>
105 <td><var>version</var> は
106 <code>/<var>regex</var>/</code> 形式</td></tr>
107 <tr><td><code>~</code></td>
108 <td><var>version</var> は
109 <code><var>regex</var></code> 形式</td></tr>
112 <example><title>例</title>
113 <IfVersion = /^2.1.[01234]$/><br />
115 # e.g. workaround for buggy versions
120 <p>マッチングの否定を表現するために、すべてのオペレータは前に
121 感嘆符 (<code>!</code>)を付けることができます:</p>
124 <IfVersion !~ ^2.1.[01234]$><br />
126 # not for those versions<br />
131 <p><var>operator</var> が省略されたときは <code>=</code> と