594f344c3945076531653fec42eb1ed6f45bbfb2kawai<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
594f344c3945076531653fec42eb1ed6f45bbfb2kawai<?xml-stylesheet type="text/xsl" href="/style/manual.ja.xsl"?>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi<!-- English Revision: 1421821 -->
031b91a62d25106ae69d4693475c79618dd5e884fielding Licensed to the Apache Software Foundation (ASF) under one or more
031b91a62d25106ae69d4693475c79618dd5e884fielding contributor license agreements. See the NOTICE file distributed with
031b91a62d25106ae69d4693475c79618dd5e884fielding this work for additional information regarding copyright ownership.
031b91a62d25106ae69d4693475c79618dd5e884fielding The ASF licenses this file to You under the Apache License, Version 2.0
031b91a62d25106ae69d4693475c79618dd5e884fielding (the "License"); you may not use this file except in compliance with
031b91a62d25106ae69d4693475c79618dd5e884fielding the License. You may obtain a copy of the License at
594f344c3945076531653fec42eb1ed6f45bbfb2kawai Unless required by applicable law or agreed to in writing, software
594f344c3945076531653fec42eb1ed6f45bbfb2kawai distributed under the License is distributed on an "AS IS" BASIS,
594f344c3945076531653fec42eb1ed6f45bbfb2kawai WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
594f344c3945076531653fec42eb1ed6f45bbfb2kawai See the License for the specific language governing permissions and
594f344c3945076531653fec42eb1ed6f45bbfb2kawai limitations under the License.
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>様々なバージョンの httpd の異なる設定を扱うことになる、
208651a016b098f4fa1f6279559f104d70f1632dtakashi テストスイートや大規模ネットワークでの使用のために設計されています。
208651a016b098f4fa1f6279559f104d70f1632dtakashi このモジュールは新しいコンテナ ― <directive
208651a016b098f4fa1f6279559f104d70f1632dtakashi type="section" module="mod_version">IfVersion</directive> を
208651a016b098f4fa1f6279559f104d70f1632dtakashi 提供します。これを使うと、数字の比較や正規表現による柔軟な
208651a016b098f4fa1f6279559f104d70f1632dtakashi バージョンチェックができるようになります。</p>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi<IfVersion 2.4.2>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi # current httpd version is exactly 2.4.2
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi</IfVersion>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi<IfVersion >= 2.5>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi # use really new features :-)
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi</IfVersion>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi </highlight>
594f344c3945076531653fec42eb1ed6f45bbfb2kawai<syntax><IfVersion [[!]<var>operator</var>] <var>version</var>> ...
594f344c3945076531653fec42eb1ed6f45bbfb2kawai</IfVersion></syntax>
594f344c3945076531653fec42eb1ed6f45bbfb2kawai<contextlist><context>server config</context><context>virtual host</context>
594f344c3945076531653fec42eb1ed6f45bbfb2kawai<context>directory</context><context>.htaccess</context></contextlist>
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p><directive type="section">IfVersion</directive> は <program>httpd</program> のバージョン
208651a016b098f4fa1f6279559f104d70f1632dtakashi が基準を満たしたときにのみ実行させたいディレクティブを囲みます。
208651a016b098f4fa1f6279559f104d70f1632dtakashi <code><var>major</var>[.<var>minor</var>[.<var>patch</var>]]</code> という
208651a016b098f4fa1f6279559f104d70f1632dtakashi <var>minor</var> と <var>patch</var> は省略可能です。省略された場合は、
208651a016b098f4fa1f6279559f104d70f1632dtakashi 指定できます:</p>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi<IfVersion >= 2.3>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi # this happens only in versions greater or
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi # equal 2.3.0.
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi</IfVersion>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi </highlight>
7c4536c7ddaa34f77bba8dc542595524db46e1fckawai <p>数値比較に加えて、http のバージョン番号に対して
208651a016b098f4fa1f6279559f104d70f1632dtakashi マッチングができます。二種類の書き方があります:</p>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi<IfVersion = /^2.4.[01234]$/>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi # e.g. workaround for buggy versions
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi</IfVersion>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi </highlight>
208651a016b098f4fa1f6279559f104d70f1632dtakashi <p>マッチングの否定を表現するために、すべてのオペレータは前に
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi<IfVersion !~ ^2.4.[01234]$>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi # not for those versions
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi</IfVersion>
4a47ffe35ce63fff3a755f750e6dcce8c4bfe52ctakashi </highlight>
208651a016b098f4fa1f6279559f104d70f1632dtakashi みなされます。</p>
594f344c3945076531653fec42eb1ed6f45bbfb2kawai</directivesynopsis>
594f344c3945076531653fec42eb1ed6f45bbfb2kawai</modulesynopsis>