home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 November
/
CMCD1104.ISO
/
Software
/
Complet
/
Apache
/
apache_2.0.52-win32-x86-no_ssl.msi
/
Data.Cab
/
F277929_rewriteguide.xml.ko
< prev
next >
Wrap
Extensible Markup Language
|
2004-09-06
|
62KB
|
2,013 lines
<?xml version="1.0" encoding="EUC-KR" ?>
<!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ko.xsl"?>
<!-- English Revision: 1.4.2.12 -->
<!--
Copyright 2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<manualpage metafile="rewriteguide.xml.meta">
<parentdocument href="./">Miscellaneous Documentation</parentdocument>
<title>URL └τ└█╝║ ┴÷─º╝¡</title>
<summary>
<note>
<p>┐°└·└┌<br />
<cite>Ralf S. Engelschall <rse@apache.org></cite><br />
1997│Γ 12┐∙</p>
</note>
<p>└╠ ╣«╝¡┤┬ <module>mod_rewrite</module> <a
href="../mod/mod_rewrite.html">┬ⁿ┴╢ ╣«╝¡</a>╕ª ║╕├µ╟╤┤┘.
└╠ ╣«╝¡┤┬ └Ñ░ⁿ╕«└┌░í ╜╟┴ª └█╛≈┐í╝¡ ║╬╡·─í░╘╡╟┤┬ └ⁿ╟ⁿ└√└╬
URL░ⁿ╖├ ╣«┴ª╕ª ╟╪░ß╟╧▒Γ└º╟╪╝¡ ╛ε╢╗░╘ ╛╞╞──í
<module>mod_rewrite</module>╕ª ╗τ┐δ╟╧┤┬┴÷ ╝│╕φ╟╤┤┘. URL
└τ└█╝║ ▒╘─ó└╗ ╝│┴ñ╟╧┐⌐ ╣«┴ª╕ª ╟╪░ß╟╧┤┬ ╣µ╣²└╗ └┌╝╝╚≈ ╝│╕φ╟╤┤┘.</p>
</summary>
<section id="ToC1">
<title><code>mod_rewrite</code> ╝╥░│</title>
<p>╛╞╞──í <module>mod_rewrite</module> ╕≡╡Γ└║ ▒▓└σ╟╧┤┘.
┴∩, URL└╗ ┴╢└█╟╥ ╝÷ └╓┤┬ ░¡╖┬╟╧░φ ╜╟╖╬ ┴ñ▒│╟╤ ╕≡╡Γ└╠┤┘.
╗≤╗≤╟╪┐╘┤° ░┼└╟ ╕≡╡τ ┴╛╖∙└╟ URL ┴╢└█└╠ ░í┤╔╟╧┤┘. ▒╫╖»│¬
▒╫ ┤δ░í╖╬ ╗τ┐δ╟╧▒Γ ║╣└Γ╟╧┤┘. <module>mod_rewrite</module>└╟
├╓┤δ ┤▄┴í└║ ├╩║╕└┌░í └╠╟╪╟╧░φ ╗τ┐δ╟╧▒Γ ╜▒┴÷ ╛╩┤┘┤┬ ┴í└╠┤┘.
╜╔┴÷╛ε ╛╞╞──í └ⁿ╣«░í╡╡ ┴╛┴╛ <module>mod_rewrite</module>└╟
╗⌡╖╬┐ε ┐δ╡╡╕ª ╣▀░▀╟╤┤┘.</p>
<p>┤┘╕Ñ ╕╗╖╬: <module>mod_rewrite</module>┐í ┤δ╟╪ ┤τ╜┼└║
├│└╜┐í ░╠└╗ ╕╘░φ └²┤δ╖╬ ┤┘╜├ ╗τ┐δ╟╧┴÷ ╛╩░┼│¬, ░¡╖┬╟╘┐í ╕┼╖ß╡╟╛ε
╛╒└╕╖╬ ╗ε ╡┐╛╚ ╗τ╢√┐í ║ⁿ┴· ░═└╠┤┘. └╠ ▒█└║ ├╣╣°┬░ ░µ┐∞╕ª
╕╖▒Γ└º╟╪ └╠╣╠ ╛╦╖┴┴° ╕ε░í┴÷ ╝║░°╗τ╖╩╕ª ╝╥░│╟╧╖┴░φ ╟╤┤┘.</p>
</section>
<section id="ToC2">
<title>╜╟┐δ└√└╬ ╟╪░ß├Ñ</title>
<p>└╠┴ª │╗░í ┴≈┴ó ╕╕╡Θ╛·░┼│¬ ┤┘╕Ñ ╗τ╢≈╡Θ└╠ ╕╕╡τ ╕╣└║ ╜╟┐δ└√└╬
╟╪░ß├Ñ└╠ │¬┐┬┤┘. ┐╣┴ª┐í╝¡ URL └τ└█╝║└╟ ╚µ╕╢╝·└╗ ╕╢└╜▓» ╣Φ┐∞▒µ
╣┘╢⌡┤┘.</p>
<note type="warning">┴╓└╟: ╝¡╣÷ ╝│┴ñ┐í ╡√╢≤ ╗≤╚▓┐í ╕┬░╘
┐╣┴ª╕ª ┴╢▒▌ ╝÷┴ñ╟╪╛▀ ╟╥ ░µ┐∞░í └╓┤┘. ┐╣╕ª ╡Θ╛ε, ├▀░í╖╬
<module>mod_alias</module>, <module>mod_userdir</module>
╡ε└╗ ╗τ┐δ╟╤┤┘╕Θ <code>[PT]</code> ╟├╖í▒╫╕ª ├▀░í╟╤┤┘. ╚ñ└║
┴╓╝¡╣÷╝│┴ñ/░í╗≤╚ú╜║╞« ╗τ┐δ└σ╝╥░í ╛╞┤╤ <code>.htaccess</code>
╗τ┐δ└σ╝╥┐í ╛╦╕┬░╘ ▒╘─ó└╗ ╝÷┴ñ╟╥ ╝÷╡╡ └╓┤┘. ╗τ┐δ╟╧▒Γ └ⁿ┐í
╟╫╗≤ ▒╘─ó└╠ ╛ε╢▓ ▒Γ┤╔└╗ ╟╧┤┬┴÷ └╠╟╪╟╧╡╡╖╧ ╟╪╢≤. ▒╫╖»╕Θ ╣«┴ª╕ª
╟╟╟╥ ╝÷ └╓┤┘.</note>
</section>
<section id="url">
<title>URL ▒╕┴╢</title>
<section>
<title>▒Γ┴╪└╠ ╡╟┤┬ URL</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╟╤ ╕«╝╥╜║┐í ┤δ╟╪ ┐⌐╖» URL└╗ ░í┴÷┤┬ └Ñ╝¡╣÷░í └╓┤┘.
║╕┼δ (╜╟┴ª ╗τ┐δ╟╧░φ ╛╦╖┴┴«╛▀ ╟╥) ▒Γ┴╪└╠ ╡╟┤┬ URL░·,
┤▄├α ╚ñ└║ │╗║╬ ┐δ╡╡└╟ URL└╠ └╓┤┘. ╗τ┐δ└┌░í ┐Σ├╗┐í
╛ε╢▓ URL└╗ ╗τ┐δ╟╧┤°┴÷ ▒Γ┴╪└╠ ╡╟┤┬ URL╕╕└╗ ║╕┐⌐┴α╛▀
╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>▒Γ┴╪└╠ ╡╟┴÷╛╩┤┬ ╕≡╡τ URL└╗ ║Ω╢≤┐∞└·░í ╛╦╡╡╖╧ ░φ─í▒Γ└º╟╪
┐▄║╬ HTTP ╕«┤┘└╠╖║╝╟╟╤┤┘. ┐╣╕ª ╡Θ╛ε ╛╞╖í ▒╘─ó└║
<code>/~user</code>╕ª ▒Γ┴╪└╠ ╡╟┤┬ <code>/u/user</code>╖╬
┤δ├╝╟╧░φ, <code>/u/user</code> ╕╢┴÷╕╖┐í ╜╜╖í╜¼░í ╛°┤┘╕Θ
├▀░í╟╤┤┘.</p>
<example><pre>
RewriteRule ^/<strong>~</strong>([^/]+)/?(.*) /<strong>u</strong>/$1/$2 [<strong>R</strong>]
RewriteRule ^/([uge])/(<strong>[^/]+</strong>)$ /$1/$2<strong>/</strong> [<strong>R</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>▒Γ┴╪└╠ ╡╟┤┬ ╚ú╜║╞«╕φ</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>└╠ ▒╘─ó└║ ╡┐└╧╟╤ ╗τ└╠╞«┐í ╡╡┤▐╟╥ ╝÷ └╓┤┬ ┤┘╕Ñ ╚ú╜║╞«╕φ
┤δ╜┼ ╞»┴ñ ╚ú╜║╞«╕φ└╗ ╗τ┐δ╟╧╡╡╖╧ ░¡┴ª╟╤┤┘. ┐╣╕ª ╡Θ╛ε,
<strong>example.com</strong> ┤δ╜┼
<strong>www.example.com</strong>└╗ ╗τ┐δ╟╧╡╡╖╧ ░¡┴ª╟╧░φ
╜═┤┘╕Θ ┤┘└╜░· ░░└║ ▒╘─ó└╗ ╗τ┐δ╟╥ ╝÷ └╓┤┘.</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<example><pre>
# 80╣°└╠ ╛╞┤╤ ╞≈╞«┐í╝¡ ╜╟╟α╟╧┤┬ ╗τ└╠╞«┐δ
RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*) http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R]
# ▒╫╕«░φ, 80╣° ╞≈╞«┐í╝¡ ╜╟╟α╟╧┤┬ ╗τ└╠╞«┐δ
RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R]
</pre></example>
</dd>
</dl>
</section>
<section>
<title><code>DocumentRoot</code>╕ª ┐┼▒Σ ░µ┐∞</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>└Ñ╝¡╣÷└╟ <directive
module="core">DocumentRoot</directive>┤┬ ║╕┼δ URL
"<code>/</code>"░· ┴≈┴ó ░ⁿ╖├└╓┤┘. ▒╫╖»│¬ └╠░≈┐í ╕≡╡τ
└┌╖ß░í └╓┴÷ ╛╩░φ, └┌╖ß░í ┤┘╕Ñ ┐⌐╖» ░≈┐í ╚≡╛ε┴«└╓┤┬
░µ┐∞░í └╓┤┘. ┐╣╕ª ╡Θ╛ε └╬╞«╢≤│▌ ╗τ└╠╞«┐í (┐▄║╬╕ª └º╟╤
╚¿╞Σ└╠┴÷) <code>/e/www/</code>┐═ (└╬╞«╢≤│▌└╗ └º╟╤
╚¿╞Σ└╠┴÷) <code>/e/sww/</code>░í └╓┤┘░φ ╟╧└┌. └╠┴ª
<directive module="core">DocumentRoot</directive>░í
<code>/e/www/</code>└╠▒Γ╢º╣«┐í, ┐Σ├╗┐í╝¡ ╞Σ└╠┴÷┐í
╞≈╟╘╡╚ ▒╫╕▓ ╡ε└╗ └╠░≈┐í╝¡ ░í┴«┐═╛▀ ╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>┐∞╕«┤┬ URL <code>/</code>╕ª <code>/e/www/</code>╖╬
╕«┤┘└╠╖║╝╟╕╕ ╟╧╕Θ ╡╚┤┘. ╗τ╝╥╟╪ ║╕└╠┴÷╕╕ ╜╟┴ª╖╬
<module>mod_rewrite</module>╕ª ╗τ┐δ╟╪╝¡╕╕ ░í┤╔╟╧┤┘.
(<module>mod_alias</module> ╡ε└╠ ┴ª░°╟╧┤┬) URL
<em>Alias</em> ░░└║ └ⁿ╟ⁿ└√└╬ ╣µ╣²└║ <em>╛╒║╬║╨</em>╕╕
├ú┤┬┤┘. <directive module="core">DocumentRoot</directive>░í
╕≡╡τ URL└╟ ╛╒║╬║╨└╠▒Γ╢º╣«┐í └╠ ╣µ╣²└╗ ╗τ┐δ╟╧┐⌐ ╕«┤┘└╠╖║╝╟└╗
╟╥ ╝÷ ╛°┤┘. <module>mod_rewrite</module>╕ª ╗τ┐δ╟╧╕Θ
┴°┬Ñ ░ú┤▄╟╧┤┘:</p>
<example><pre>
RewriteEngine on
RewriteRule <strong>^/$</strong> /e/www/ [<strong>R</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╕╢┴÷╕╖ ╜╜╖í╜¼ ╣«┴ª</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╡≡╖║┼Σ╕«╕ª ┴÷─¬╟╧┤┬ URL└╟ ╕╢┴÷╕╖ ╜╜╖í╜¼ ╣«┴ª░í
╛°┤┘╕Θ ╕≡╡τ └Ñ░ⁿ╕«└┌┤┬ ╚»╚ú╟╥ ░═└╠┤┘. ╜╜╖í╜¼░í ╛°┤┘╕Θ,
┴∩ <code>/~quux/foo/</code> ┤δ╜┼ <code>/~quux/foo</code>╕ª
╗τ┐δ╟╧╕Θ ╝¡╣÷░í <code>foo</code>╢≤┤┬ <em>╞─└╧</em>└╗
├ú▒Γ╢º╣«┐í ┐└╖∙░í ╣▀╗²╟╤┤┘. ╞─└╧└╠ ╡≡╖║┼Σ╕«└╠▒Γ╢º╣«┐í
╣▐╛╞╡Θ└╠┴÷ ╛╩┤┬┤┘. ┤δ║╬║╨└╟ ░µ┐∞ ║╕┼δ ╝¡╣÷░í └┌╡┐└╕╖╬
URL└╗ ░φ─í┴÷╕╕, ░í▓√ ┴≈┴ó ╟╪┴α╛▀ ╟╥ ░µ┐∞░í └╓┤┘. ┐╣╕ª
╡Θ╛ε, CGI ╜║┼⌐╕│╞« ╡ε└╕╖╬ ║╣└Γ╟╤ URL └τ└█╝║└╗ ╟╤ ╚─┐í
▒╫╖»╟╧┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└╠ ╣╠╣ª╟╤ ╣«┴ª└╟ ╟╪░ß╣µ╣²└║ ╝¡╣÷░í └┌╡┐└╕╖╬ ╕╢┴÷╕╖
╜╜╖í╜¼╕ª ├▀░í╟╧┤┬ ░═└╠┤┘. ║Ω╢≤┐∞└·░í │¬╕╙┴÷ ▒╫╕▓ ╡ε└╗
┐├╣┘╖╬ ┐Σ├╗╟╥ ╝÷ └╓╡╡╖╧, ┐▄║╬ ╕«┤┘└╠╖║╝╟└╗ ╟╪╛▀ ╟╤┤┘.
│╗║╬ ╕«┤┘└╠╖║╝╟└╗ ╟╤┤┘╕Θ ╡≡╖║┼Σ╕« ╞Σ└╠┴÷┐í╕╕ ╡┐└█╟╧┐⌐
└╠ ╞Σ└╠┴÷░í ╗≤┤δ URL╖╬ ╞≈╟╘╟╧┤┬ ▒╫╕▓└╗ ║Ω╢≤┐∞└·░í
┐Σ├╗╟╥╢º ├ú└╗ ╝÷ ╛°┤┘. ┐╣╕ª ╡Θ╛ε, ┐▄║╬ ╕«┤┘└╠╖║╝╟└╗
╗τ┐δ╟╧┴÷ ╛╩└╗╢º <code>/~quux/foo/index.html</code>┐í╝¡
<code>image.gif</code>╕ª ┐Σ├╗╟╧╕Θ
<code>/~quux/image.gif</code>╕ª ┐Σ├╗╟╧░╘ ╡╚┤┘!</p>
<p>▒╫╖í╝¡ └╠╕ª ╟╪░ß╟╧▒Γ└º╟╪ ┤┘└╜░· ░░└╠ ╝│┴ñ╟╤┤┘:</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^foo<strong>$</strong> foo<strong>/</strong> [<strong>R</strong>]
</pre></example>
<p>╚¿╡≡╖║┼Σ╕«└╟ ├╓╗≤└º <code>.htaccess</code> ╞─└╧┐í
┤┘└╜░· ░░└╠ ╝│┴ñ╟╥ ╝÷╡╡ └╓┤┘. ▒╫╖»│¬ ├│╕«╟╧┤┬╡Ñ ║╬┤π└╠
╡╚┤┘.</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteCond %{REQUEST_FILENAME} <strong>-d</strong>
RewriteRule ^(.+<strong>[^/]</strong>)$ $1<strong>/</strong> [R]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>└╧░ⁿ╡╚ URL ▒╕┴╢╖╬ ╕╕╡τ └Ñ┼¼╖»╜║┼═</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>└╬╞«╢≤│▌ └Ñ╝¡╣÷▒║└╟ ╕≡╡τ └Ñ╝¡╣÷┐í ╡┐└╧╟╧░φ └╧░ⁿ╡╚
URL ▒╕┴╢╕ª ╕╕╡Θ░φ ╜═┤┘. ┴∩, ╕≡╡τ (┴ñ└╟╗≤ ╝¡╣÷┐í ╝╙╟╧┐⌐
╝¡╣÷┐í └╟┴╕└√└╬!) URL└╗ ╝¡╣÷ <em>╡╢╕│└√└╕╖╬</em> ╕╕╡τ┤┘!
└Ñ └╠╕º░°░ú┐í ╝¡╣÷╡╢╕│└√└╬ ╡┐└╧╟╤ ▒╕┴╢╕ª ║╬┐⌐╟╪╛▀ ╟╤┤┘:
URL└║ ╜╟┴ª ╝¡╣÷╕ª ┴÷─¬╟╧╕Θ ╛╚╡╚┤┘. ╝¡╣÷▒║└╠ └┌╡┐└╕╖╬
╜╟┴ª ╝¡╣÷╖╬ └»╡╡╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╕╒└· ╗τ┐δ└┌, ▒╫╖∞, ╡╢╕│├╝└╟ └º─í ┴ñ║╕╕ª └·└σ╟╤
(║╨╗Ω╡╚) ┐▄║╬╕╩┐í ╜╟┴ª ╝¡╣÷ ┴ñ║╕╕ª ╛≥╛ε┐┬┤┘. ┐▄║╬╕╩└║
┤┘└╜░· ░░└║ ╟ⁿ╜─└╠┤┘</p>
<example><pre>
user1 server_of_user1
user2 server_of_user2
: :
</pre></example>
<p>┐∞╕«┤┬ └╠ ┴ñ║╕╕ª ░ó░ó <code>map.xxx-to-host</code>
╞─└╧┐í └·└σ╟▀┤┘. ┤┘└╜└╕╖╬ ╕≡╡τ ╝¡╣÷┐í╝¡ URL└╠ ╝¡╣÷┐í
╛°┤┘╕Θ ┤┘└╜░· ░░└║ URL└╗,</p>
<example><pre>
/u/user/anypath
/g/group/anypath
/e/entity/anypath
</pre></example>
<p>┤┘└╜░· ░░└╠ ╕«┤┘└╠╖║╝╟╟╤┤┘</p>
<example><pre>
http://physical-host/u/user/anypath
http://physical-host/g/group/anypath
http://physical-host/e/entity/anypath
</pre></example>
<p>╛╞╖í ▒╘─ó└║ ╕╩╞─└╧└╗ ╗τ┐δ╟╧┐⌐ └╠ └█╛≈└╗ ╟╤┤┘ (server0└║
╕╩┐í ╟╫╕±└╠ ╛°┤┬ ░µ┐∞ ╗τ┐δ╟╥ ▒Γ║╗╝¡╣÷╢≤░φ ░í┴ñ╟╤┤┘):</p>
<example><pre>
RewriteEngine on
RewriteMap user-to-host txt:/path/to/map.user-to-host
RewriteMap group-to-host txt:/path/to/map.group-to-host
RewriteMap entity-to-host txt:/path/to/map.entity-to-host
RewriteRule ^/u/<strong>([^/]+)</strong>/?(.*) http://<strong>${user-to-host:$1|server0}</strong>/u/$1/$2
RewriteRule ^/g/<strong>([^/]+)</strong>/?(.*) http://<strong>${group-to-host:$1|server0}</strong>/g/$1/$2
RewriteRule ^/e/<strong>([^/]+)</strong>/?(.*) http://<strong>${entity-to-host:$1|server0}</strong>/e/$1/$2
RewriteRule ^/([uge])/([^/]+)/?$ /$1/$2/.www/
RewriteRule ^/([uge])/([^/]+)/([^.]+.+) /$1/$2/.www/$3\
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╚¿╡≡╖║┼Σ╕«╕ª ┤┘╕Ñ └Ñ╝¡╣÷╖╬ └╠└ⁿ</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╕╣└║ └Ñ░ⁿ╕«└┌┤┬ └Ñ╝¡╣÷└╟ ╕≡╡τ ╚¿╡≡╖║┼Σ╕«╕ª ┤┘╕Ñ
└Ñ╝¡╣÷╖╬ └╠└ⁿ╟╤ ░µ┐∞ ╟╪░ß├Ñ└╗ ╣░╛ε║╗┤┘. └╠ ╣µ╣²└║
└╠└ⁿ ╝¡╣÷╕ª ┤δ├╝╟╥ ╗⌡╖╬┐ε ╝¡╣÷╕ª ▒╕╝║╟╧┤┬╡Ñ ╜├░ú└╠
░╔╕«┤┬ ░µ┐∞┐í ╟╩┐Σ╟╧┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p><module>mod_rewrite</module>╕ª ╗τ┐δ╟╧╕Θ ░ú┤▄╟╧┤┘.
└╠└ⁿ └Ñ╝¡╣÷┤┬ ╕≡╡τ <code>/~user/anypath</code> URL└╗
<code>http://newserver/~user/anypath</code>╖╬
╕«┤┘└╠╖║╝╟╟╧╕Θ ╡╚┤┘.</p>
<example><pre>
RewriteEngine on
RewriteRule ^/~(.+) http://<strong>newserver</strong>/~$1 [R,L]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╚¿╡≡╖║┼Σ╕« ▒╕┴╢ ╕╕╡Θ▒Γ</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╗τ┐δ└┌░í ╝÷├╡╕φ└╬ ╗τ└╠╞«┤┬ ║╕┼δ ╚¿╡≡╖║┼Σ╕« ▒╕┴╢╕ª
╕╕╡τ┤┘. ┴∩, ┐╣╕ª ╡Θ╛ε └╠╕º└╠ ╗τ┐δ└┌╕φ└╟ ├╣╣°┬░ ╣«└┌└╬
╟╧└º╡≡╖║┼Σ╕«┐í ╚¿╡≡╖║┼Σ╕«╕ª ╡╨┤┘. ▒╫╖í╝¡,
<code>/~foo/anypath</code>┤┬
<code>/home/<strong>f</strong>/foo/.www/anypath</code>└╠░φ,
<code>/~bar/anypath</code>┤┬
<code>/home/<strong>b</strong>/bar/.www/anypath</code>└╠┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╣░░ß╟Ñ╜├░í └╓┤┬ URL└╗ └º┐═ ░░└║ ▒╕┴╢╖╬ ║»╚»╟╧▒Γ└º╟╪
┤┘└╜ ▒╘─ó└╗ ╗τ┐δ╟╤┤┘.</p>
<example><pre>
RewriteEngine on
RewriteRule ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*) /home/<strong>$2</strong>/$1/.www$3
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╞─└╧╜├╜║┼█ └τ▒╕╝║</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>└╠ ┐╣┤┬ ╜╟╖╬ ╟╧╡σ─┌╛ε└√└╠┤┘: ╡≡╖║┼Σ╕«║░
<code>RewriteRules</code>╕ª ╕┼┐∞ ╕╣└╠ ╗τ┐δ╟╧┐⌐ └┌╖ß
└┌├╝┤┬ ▒╫┤δ╖╬ ╡╨├╝╖╬ └Ñ┐í └┌╖ß╕ª └┌┐¼╜║╖┤░╘ ║Ω╢≤┐∞┬í╟╧╡╡╖╧
╟╤┤┘. ╣Φ░µ: │¬┤┬ 1992│Γ ║╬┼═ └┌└»╖╙░╘ ╗τ┐δ╟╥ ╝÷ └╓┤┬
└»┤╨╜║ ╝╥╟┴╞«┐■╛ε╡Θ└╗ <strong><em>net.sw</em></strong>┐í
╕≡╛╞╡╬░φ └╓╛·┤┘. └╠┤┬ │╗░í ──╟╗┼═░·╟╨└╗ ░°║╬╟╧╕Θ╝¡
┐⌐╖»╟╪╡┐╛╚ ┐⌐░í╜├░ú┐í ╜├╜║┼█ ░ⁿ╕«└┌┐═ │╫╞«┐≈ ░ⁿ╕«└┌╕ª
╟╪┐╘▒Γ╢º╣«┐í │╗ ├δ╣╠└╠└┌ └╧└╠┤┘. ╕┼┴╓╕╢┤┘ ╗⌡╖╬ ╝╥╟┴╞«┐■╛ε░í
├▀░í╡╔ ╢º╕╢┤┘ ╡≡╖║┼Σ╕«╕ª ▒φ░╘ ╕╕╡Θ╛ε┐╘┤┘:</p>
<example><pre>
drwxrwxr-x 2 netsw users 512 Aug 3 18:39 Audio/
drwxrwxr-x 2 netsw users 512 Jul 9 14:37 Benchmark/
drwxrwxr-x 12 netsw users 512 Jul 9 00:34 Crypto/
drwxrwxr-x 5 netsw users 512 Jul 9 00:41 Database/
drwxrwxr-x 4 netsw users 512 Jul 30 19:25 Dicts/
drwxrwxr-x 10 netsw users 512 Jul 9 01:54 Graphic/
drwxrwxr-x 5 netsw users 512 Jul 9 01:58 Hackers/
drwxrwxr-x 8 netsw users 512 Jul 9 03:19 InfoSys/
drwxrwxr-x 3 netsw users 512 Jul 9 03:21 Math/
drwxrwxr-x 3 netsw users 512 Jul 9 03:24 Misc/
drwxrwxr-x 9 netsw users 512 Aug 1 16:33 Network/
drwxrwxr-x 2 netsw users 512 Jul 9 05:53 Office/
drwxrwxr-x 7 netsw users 512 Jul 9 09:24 SoftEng/
drwxrwxr-x 7 netsw users 512 Jul 9 12:17 System/
drwxrwxr-x 12 netsw users 512 Aug 3 20:15 Typesetting/
drwxrwxr-x 10 netsw users 512 Jul 9 14:08 X11/
</pre></example>
<p>1996│Γ 7┐∙ └╠ └·└σ╝╥╕ª ╕┌└╓┤┬ └Ñ └╬┼═╞Σ└╠╜║╕ª ┼δ╟╪
╝╝╗≤┐í ░°░│╟╧▒Γ╖╬ ░ß┴ñ╟▐┤┘. "╕┌└╓┤┘"┤┬ ╕╗└║, ├╓╗≤└º
╡≡╖║┼Σ╕«┐í CGI ╜║┼⌐╕│╞«╕ª ╡╬┴÷ ╛╩░φ╡╡, └·└σ╝╥ ░Φ├■▒╕┴╢╕ª
┴≈┴ó ║Ω╢≤┐∞┴·╟╧▒µ ╣┘╢⌡┤┘┤┬ ╢µ└╠┤┘. ┐╓? └·└σ╝╥╕ª │¬┴▀┐í
FTP╖╬╡╡ ┴ó▒┘╟╥ ╝÷ └╓╡╡╖╧ ╕╕╡Θ ┐╣┴ñ└╠┐┤▒Γ╢º╣«┐í └Ñ└╠│¬
CGI┐═ ░ⁿ╖├╡╚ │╗┐δ└╗ ░░└╠ ╡╬▒Γ ╜╚╛·┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╟╪░ß├Ñ└║ ╡╬ ║╬║╨└╕╖╬ │¬┤╢┤┘: ╕╒└· ╡≡╖║┼Σ╕« ╝÷┴╪┐í╝¡
╟╩┐Σ╟╤ ╕≡╡τ ╞Σ└╠┴÷╕ª ╡┐└√└╕╖╬ ╕╕╡σ┤┬ CGI ╜║┼⌐╕│╞«░í
╟╩┐Σ╟╧┤┘. │¬┤┬ └╠ ╜║┼⌐╕│╞«╡Θ└╗ ┤┘└╜░· ░░└╠
<code>/e/netsw/.www/</code>┐í ╡╬╛·┤┘:</p>
<example><pre>
-rw-r--r-- 1 netsw users 1318 Aug 1 18:10 .wwwacl
drwxr-xr-x 18 netsw users 512 Aug 5 15:51 DATA/
-rw-rw-rw- 1 netsw users 372982 Aug 5 16:35 LOGFILE
-rw-r--r-- 1 netsw users 659 Aug 4 09:27 TODO
-rw-r--r-- 1 netsw users 5697 Aug 1 18:01 netsw-about.html
-rwxr-xr-x 1 netsw users 579 Aug 2 10:33 netsw-access.pl
-rwxr-xr-x 1 netsw users 1532 Aug 1 17:35 netsw-changes.cgi
-rwxr-xr-x 1 netsw users 2866 Aug 5 14:49 netsw-home.cgi
drwxr-xr-x 2 netsw users 512 Jul 8 23:47 netsw-img/
-rwxr-xr-x 1 netsw users 24050 Aug 5 15:49 netsw-lsdir.cgi
-rwxr-xr-x 1 netsw users 1589 Aug 3 18:43 netsw-search.cgi
-rwxr-xr-x 1 netsw users 1885 Aug 1 17:41 netsw-tree.cgi
-rw-r--r-- 1 netsw users 234 Jul 30 16:35 netsw-unlimit.lst
</pre></example>
<p><code>DATA/</code> ╟╧└º╡≡╖║┼Σ╕«┐í └º┐í╝¡ ╕╗╟╤ └·└σ╝╥░í
└╓┤┘. ╜╟┴ª <strong><em>net.sw</em></strong>└╟ │╗┐δ└║ ║╕┼δ
<code>rdist</code>╕ª ╗τ┐δ╟╧┐⌐ └┌╡┐└╕╖╬ ░í┴«┐┬┤┘. ╡╬╣°┬░
║╬║╨└╠ │▓╛╥┤┘: ╛ε╢╗░╘ └╠ ╡╬ ▒╕┴╢╕ª ╟╧│¬└╟ └┌┐¼╜║╖»┐ε
URL ▒╕┴╢╖╬ ┐¼░ß╟╧┤┬░í? ╗τ┐δ└┌┐í░╘ <code>DATA/</code>
╡≡╖║┼Σ╕«╕ª ░¿├▀░φ, URL╕╢┤┘ └√└²╟╤ CGI ╜║┼⌐╕│╞«╕ª ╜╟╟α╟╧░φ
╜═┤┘. ╟╪░ß├Ñ└║ ┤┘└╜░· ░░┤┘: ╕╒└· ╝¡╣÷└╟ <directive
module="core">DocumentRoot</directive>┐í╝¡ ░°░│╡╚
URL <code>/net.sw/</code>╕ª │╗║╬ ░µ╖╬ <code>/e/netsw</code>╖╬
└τ└█╝║╟╧▒Γ└º╟╪ ╡≡╖║┼Σ╕«║░ ╝│┴ñ╞─└╧┐í ┤┘└╜░· ░░└╠ ╝│┴ñ╟╤┤┘:</p>
<example><pre>
RewriteRule ^net.sw$ net.sw/ [R]
RewriteRule ^net.sw/(.*)$ e/netsw/$1
</pre></example>
<p>├╣╣°┬░ ▒╘─ó└║ ╕╢┴÷╕╖┐í ╜╜╖í╜¼░í ╛°┤┬ ┐Σ├╗└╗ └º╟╪╝¡
╗τ┐δ╟▀┤┘! ╡╬╣°┬░ ▒╘─ó└╠ ╜╟┴ª └█╛≈└╗ ╟╤┤┘. ▒╫╕«░φ ╡≡╖║┼Σ╕«║░
╝│┴ñ╞─└╧ <code>/e/netsw/.www/.wwwacl</code>┐í ░ß┴ñ└√└╬
╝│┴ñ└╠ │¬┐┬┤┘:</p>
<example><pre>
Options ExecCGI FollowSymLinks Includes MultiViews
RewriteEngine on
# ╛╒ ║╬║╨└╠ /net.sw/ ╖╬ ┴ó▒┘╟╤┤┘
RewriteBase /net.sw/
# ╕╒└· ├╓╗≤└º ╡≡╖║┼Σ╕«╕ª
# cgi ╜║┼⌐╕│╞«╖╬ └τ└█╝║╟╤┤┘
RewriteRule ^$ netsw-home.cgi [L]
RewriteRule ^index\.html$ netsw-home.cgi [L]
# ║Ω╢≤┐∞└·░í ╡≡╖║┼Σ╕«║░ ╞Σ└╠┴÷╕ª ┐Σ├╗╟╤ ░µ┐∞
# ╟╧└º╡≡╖║┼Σ╕«╕ª ├▀├Γ╟╤┤┘
RewriteRule ^.+/(netsw-[^/]+/.+)$ $1 [L]
# └╠┴ª └τ└█╝║└╗ ╕╢─ú┤┘
RewriteRule ^netsw-home\.cgi.* - [L]
RewriteRule ^netsw-changes\.cgi.* - [L]
RewriteRule ^netsw-search\.cgi.* - [L]
RewriteRule ^netsw-tree\.cgi$ - [L]
RewriteRule ^netsw-about\.html$ - [L]
RewriteRule ^netsw-img/.*$ - [L]
# ┤┘╕Ñ cgi ╜║┼⌐╕│╞«░í ├│╕«╟╥
# ╟╧└º╡≡╖║┼Σ╕«░í │▓╛╥┤┘
RewriteRule !^netsw-lsdir\.cgi.* - [C]
RewriteRule (.*) netsw-lsdir.cgi/$1
</pre></example>
<p>╟╪╝«└╗ └º╟╤ ╚∙╞«:</p>
<ol>
<li>│╫╣°┬░ ║╬║╨┐í╝¡ ┤δ├╝ ╟╩╡σ('<code>-</code>')░í
╛°░φ <code>L</code> (last) ╟├╖í▒╫░í └╓└╜└╗ ┴╓╕±╟╧╢≤</li>
<li>╕╢┴÷╕╖ ║╬║╨┐í╝¡ ├╣╣°┬░ ▒╘─ó┐í <code>!</code>
(not) ╣«└┌┐═ <code>C</code> (chain) ╟├╖í▒╫╕ª ┴╓╕±╟╧╢≤</li>
<li>╕╢┴÷╕╖ ▒╘─ó┐í╝¡ ▒Γ┼╕ ╟╪┤τ╟╧┴÷ ╛╩┤┬ ╕≡╡τ ░µ┐∞╕ª
└Γ╛╞│╗┤┬ ╞╨┼╧└╗ ┴╓╕±╟╧╢≤</li>
</ol>
</dd>
</dl>
</section>
<section>
<title>NCSA imagemap└╗ ╛╞╞──í <code>mod_imap</code>└╕╖╬</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╗τ╢≈╡Θ└║ NCSA └Ñ╝¡╣÷┐í╝¡ ╟÷┤δ└√└╬ ╛╞╞──í └Ñ╝¡╣÷╖╬
└┌┐¼╜║╖┤░╘ ┐┼░▄░í▒µ ╣┘╢⌡┤┘. ▒╫╖í╝¡ ┐└╖í╡╚ NCSA
<code>imagemap</code> ╟┴╖╬▒╫╖Ñ└╗ ╗τ┐δ╟╤ ╞Σ└╠┴÷╕ª ╟÷┤δ└√└╬
╛╞╞──í <module>mod_imap</module>╖╬ ├│╕«╟╧▒µ ╣┘╢⌡┤┘.
╣«┴ª┤┬ <code>imagemap</code> ╟┴╖╬▒╫╖Ñ└╗
<code>/cgi-bin/imagemap/path/to/page.map</code>░·
░░└╠ ┬ⁿ┴╢╟╧┤┬ ╟╧└╠╞█╕╡┼⌐░í ╕╣┤┘┤┬ ░═└╠┤┘. ╛╞╞──í┤┬
<code>/path/to/page.map</code>░· ░░└║ ┐Σ├╗└╗ ╣▐╛╞╛▀
╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╕≡╡τ ┐Σ├╗┐í╝¡ ╛╒║╬║╨└╗ ╡┐└√└╕╖╬ ┴ª░┼╟╧┤┬ └ⁿ┐¬ ▒╘─ó└╗
╗τ┐δ╟╤┤┘:</p>
<example><pre>
RewriteEngine on
RewriteRule ^/cgi-bin/imagemap(.*) $1 [PT]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>┐⌐╖» ╡≡╖║┼Σ╕«┐í╝¡ ╞Σ└╠┴÷ ░╦╗÷</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>░í▓√ └Ñ╝¡╣÷░í ┐⌐╖» ╡≡╖║┼Σ╕«┐í╝¡ ╞─└╧└╗ ├ú╛╞╛▀ ╟╥
╢º░í └╓┤┘. └╠ ░µ┐∞ MultiViews│¬ ┤┘╕Ñ ╣µ╣²└║ ╡╡┐≥└╠
╛╚╡╚┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>┐⌐╖» ╡≡╖║┼Σ╕«┐í╝¡ ╞─└╧└╗ ├ú┤┬ ▒╘─ó└╗ ┴≈┴ó ╟┴╖╬▒╫╖Ñ╟╤┤┘.</p>
<example><pre>
RewriteEngine on
# ╕╒└· custom/┐í╝¡ ├ú▒µ ╜├╡╡╟╧░φ...
# ...├ú└╕╕Θ │í!
RewriteCond /your/docroot/<strong>dir1</strong>/%{REQUEST_FILENAME} -f
RewriteRule ^(.+) /your/docroot/<strong>dir1</strong>/$1 [L]
# ╡╬╣°┬░╖╬ pub/┐í╝¡ ├ú▒µ ╜├╡╡╟╤┤┘...
# ...├ú└╕╕Θ │í!
RewriteCond /your/docroot/<strong>dir2</strong>/%{REQUEST_FILENAME} -f
RewriteRule ^(.+) /your/docroot/<strong>dir2</strong>/$1 [L]
# ╕°├ú└╕╕Θ ┤┘╕Ñ Alias│¬ ScriptAlias ┴÷╜├╛ε ╡ε└╕╖╬ ┴°╟α╟╤┤┘.
RewriteRule ^(.+) - [PT]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>URL┐í ╡√╢≤ ╚»░µ║»╝÷╕ª ╝│┴ñ╟╤┤┘</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>┐Σ├╗╡Θ░ú┐í ╗≤┼┬┴ñ║╕╕ª └»┴÷╟╧▒Γ└º╟╪ URL┐í ┴ñ║╕╕ª
└╬─┌╡∙╟╧┤┬ ╣µ╣²╡╡ └╓┤┘. ▒╫╖»│¬ ┤▄┴÷ └╠ ┴ñ║╕╕ª ┴ª░┼╟╧▒Γ└º╟╪
╕≡╡τ ╞Σ└╠┴÷┐í CGI wrapper╕ª ╗τ┐δ╟╧░φ ╜═┴÷ ╛╩┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└τ└█╝║ ▒╘─ó└╗ ╗τ┐δ╟╧┐⌐ ╗≤┼┬┴ñ║╕╕ª ├▀├Γ╟╧░φ, ├▀├Γ╟╤
┴ñ║╕╕ª │¬┴▀┐í XSSI│¬ CGI┐í╝¡ ╗τ┐δ╟╧▒Γ└º╟╪ ╚»░µ║»╝÷┐í
└·└σ╟╤┤┘. ▒╫╖í╝¡ URL <code>/foo/S=java/bar/</code>┤┬
<code>/foo/bar/</code>╖╬ ║»╚»╡╟░φ <code>STATUS</code>╢≤┤┬
╚»░µ║»╝÷ ░¬└╗ "java"╖╬ ╝│┴ñ╟╤┤┘.</p>
<example><pre>
RewriteEngine on
RewriteRule ^(.*)/<strong>S=([^/]+)</strong>/(.*) $1/$3 [E=<strong>STATUS:$2</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>░í╗≤ ╗τ┐δ└┌ ╚ú╜║╞«</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>░í╗≤╚ú╜║╞«╕ª ╗τ┐δ╟╧┴÷ ╛╩░φ ░░└║ ──╟╗┼═╖╬ DNS A
╖╣─┌╡σ╕ª ╝│┴ñ╟╧┐⌐
<code>www.<strong>username</strong>.host.domain.com</code>└╗
╗τ┐δ└┌└╟ ╚¿╞Σ└╠┴÷╖╬ ┴ª░°╟╧░φ ╜═┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>HTTP/1.0 ┐Σ├╗└╟ ░µ┐∞ ╣µ╣²└╠ ╛°┴÷╕╕, Host: HTTP
╟∞┤⌡╕ª ╞≈╟╘╟╤ HTTP/1.1 ┐Σ├╗└║ ┤┘└╜ ▒╘─ó└╗ ╗τ┐δ╟╧┐⌐
│╗║╬└√└╕╖╬ <code>http://www.username.host.com/anypath</code>╕ª
<code>/home/username/anypath</code>╖╬ └τ└█╝║╟╥ ╝÷
└╓┤┘:</p>
<example><pre>
RewriteEngine on
RewriteCond %{<strong>HTTP_HOST</strong>} ^www\.<strong>[^.]+</strong>\.host\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule ^www\.<strong>([^.]+)</strong>\.host\.com(.*) /home/<strong>$1</strong>$2
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╚¿╡≡╖║┼Σ╕«╕ª ┐▄║╬ ╝¡╣÷╖╬ ╕«┤┘└╠╖║╝╟</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>┴÷┐¬ ╡╡╕▐└╬ <code>ourdomain.com</code> ╣█┐í╝¡ ┐Σ├╗└╠
╡Θ╛ε┐└╕Θ ╚¿╡≡╖║┼Σ╕« URL└╗ ┤┘╕Ñ └Ñ╝¡╣÷
<code>www.somewhere.com</code>└╕╖╬ ╕«┤┘╕«╖║╝╟╟╧▒µ
╣┘╢⌡┤┘. ┴╛┴╛ ░í╗≤╚ú╜║╞« ╗τ┐δ└σ╝╥┐í╝¡ ╗τ┐δ╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└τ└█╝║ ┴╢░╟└╗ ╗τ┐δ╟╧╕Θ ╡╚┤┘:</p>
<example><pre>
RewriteEngine on
RewriteCond %{REMOTE_HOST} <strong>!^.+\.ourdomain\.com$</strong>
RewriteRule ^(/~.+) http://www.somewhere.com/$1 [R,L]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╜╟╞╨╟╤ URL└╗ ┤┘╕Ñ └Ñ╝¡╣÷╖╬ ╕«┤┘└╠╖║╝╟</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>URL └τ└█╝║┐í ┤δ╟╪╝¡ └Ñ╝¡╣÷ A┐í ╟╪┤τ ╞─└╧└╠ ╛°┤┬
░µ┐∞ └Ñ╝¡╣÷ B╖╬ ┐Σ├╗└╗ ╕«┤┘└╠╖║╝╟╟╧┤┬ ╣µ╣²└╗ └┌┴╓
╣░╛ε║╗┤┘. ║╕┼δ Perl╖╬ └█╝║╟╤ <directive
module="core">ErrorDocument</directive> CGI ╜║┼⌐╕│╞«╕ª
╗τ┐δ╟╧┴÷╕╕, <module>mod_rewrite</module>╕ª ╗τ┐δ╟╧┤┬
╣µ╣²╡╡ └╓┤┘. ▒╫╖»│¬ ╝║┤╔└║ <directive
module="core">ErrorDocument</directive> CGI ╜║┼⌐╕│╞«║╕┤┘
╢│╛ε┴ⁿ└╗ ╕φ╜╔╟╧╢≤!</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>├╣╣°┬░ ╣µ╣²└║ ║ⁿ╕ú┴÷╕╕ └»┐¼╝║└╠ ╢│╛ε┴÷░φ ┐╧└ⁿ╟╧┴÷
╛╩┤┘:</p>
<example><pre>
RewriteEngine on
RewriteCond /your/docroot/%{REQUEST_FILENAME} <strong>!-f</strong>
RewriteRule ^(.+) http://<strong>webserverB</strong>.dom/$1
</pre></example>
<p>└╠ ╣µ╣²└╟ ┤▄┴í└║ <directive
module="core">DocumentRoot</directive> ╛╚┐í └╓┤┬ ╞Σ└╠┴÷╕╕
░í┤╔╟╧┤┘┤┬ ┴í└╠┤┘. (┐╣╕ª ╡Θ╛ε ╚¿╡≡╖║┼Σ╕« ╡ε└╗ └º╟╪)
┴╢░╟└╗ ├▀░í╟╥ ╝÷ └╓┴÷╕╕, ┤⌡ ┴┴└║ ╣µ╣²└╠ └╓┤┘:</p>
<example><pre>
RewriteEngine on
RewriteCond %{REQUEST_URI} <strong>!-U</strong>
RewriteRule ^(.+) http://<strong>webserverB</strong>.dom/$1
</pre></example>
<p><module>mod_rewrite</module>└╟ URL └ⁿ╣µ┬ⁿ┴╢(look-ahead)╕ª
╗τ┐δ╟╤┤┘. ▒╫╖í╝¡ ╕≡╡τ URL┐í ╡┐└█╟╧░φ ╛╚└ⁿ╟╧┤┘. ▒╫╖»│¬
╕≡╡τ ┐Σ├╗╕╢┤┘ │╗║╬ ╟╧└º┐Σ├╗└╗ ╟╤╣° ┤⌡ ╟╧▒Γ╢º╣«┐í └Ñ╝¡╣÷
╝║┤╔┐í ╛╟┐╡╟Γ└╗ ┴╪┤┘. ▒╫╖í╝¡ ░¡╖┬╟╤ CPU┐í╝¡ └Ñ╝¡╣÷╕ª
╜╟╟α╟╤┤┘╕Θ ╗τ┐δ╟╧╢≤. ──╟╗┼═░í ┤└╕«┤┘╕Θ ├╣╣°┬░ ╣µ╣²└╠│¬
┤⌡ │¬└║ <directive module="core">ErrorDocument</directive>
CGI ╜║┼⌐╕│╞«╕ª ╗τ┐δ╟╧╢≤.</p>
</dd>
</dl>
</section>
<section>
<title>╚«└σ ╕«┤┘└╠╖║╝╟</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>░í▓√ ╕«┤┘└╠╖║╝╟╟╧┤┬ URL└╗ ┤⌡ ┴╢└²╟╥ ╟╩┐Σ░í └╓┤┘.
╛╞╞──í │╗║╬ URL escape ╟╘╝÷┤┬ "<code>url#anchor</code>"
░░└║ URL└╟ anchor╡╡ escape╟╤┤┘. ╛╞╞──í└╟
<code>uri_escape()</code> ╟╘╝÷┤┬ ┐∞╣░┴ñ└┌(#)╡╡ ░░└╠
escape╟╧╣╟╖╬ ╗τ┐δ╟╥ ╝÷ ╛°┤┘. ▒╫╖»╕Θ ╛ε╢╗░╘ └╠╖▒ URL╖╬
╕«┤┘└╠╖║╝╟╟╥ ╝÷ └╓│¬?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>┴≈┴ó ╕«┤┘└╠╖║╝╟╟╧┤┬ NPH-CGI ╜║┼⌐╕│╞«╕ª ╗τ┐δ╟╤ ╟╪░ß├Ñ└╠
╟╩┐Σ╟╧┤┘. escape╕ª ╟╧┴÷ ╛╩▒Γ╢º╣«└╠┤┘ (NPH=non-parseable
headers). ╕╒└· ┤┘└╜ ╝¡╣÷╝│┴ñ└╗ ╟╧┐⌐ (└τ└█╝║ ▒╘─ó└╟
│í║╬║╨┐í ╗τ┐δ╟╪╛▀ ╟╤┤┘) ╗⌡╖╬┐ε URL scheme
<code>xredirect:</code>╕ª ╡╡└╘╟╤┤┘:</p>
<example><pre>
RewriteRule ^xredirect:(.+) /path/to/nph-xredirect.cgi/$1 \
[T=application/x-httpd-cgi,L]
</pre></example>
<p>▒╫╖»╕Θ <code>xredirect:</code>╖╬ ╜├└█╟╧┤┬ ╕≡╡τ URL└║
<code>nph-xredirect.cgi</code> ╟┴╖╬▒╫╖Ñ└╗ ┼δ╟╧░╘ ╡╚┤┘.
╟┴╖╬▒╫╖Ñ└║ ┤┘└╜░· ░░┤┘:</p>
<example><pre>
#!/path/to/perl
##
## nph-xredirect.cgi -- NPH/CGI script for extended redirects
## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
##
$| = 1;
$url = $ENV{'PATH_INFO'};
print "HTTP/1.0 302 Moved Temporarily\n";
print "Server: $ENV{'SERVER_SOFTWARE'}\n";
print "Location: $url\n";
print "Content-type: text/html\n";
print "\n";
print "<html>\n";
print "<head>\n";
print "<title>302 Moved Temporarily (EXTENDED)</title>\n";
print "</head>\n";
print "<body>\n";
print "<h1>Moved Temporarily (EXTENDED)</h1>\n";
print "The document has moved <a HREF=\"$url\">here</a>.<p>\n";
print "</body>\n";
print "</html>\n";
##EOF##
</pre></example>
<p>▒╫╖»╕Θ <module>mod_rewrite</module>░í ┴≈┴ó ╣▐┴÷╕°╟╧┤┬
╕≡╡τ URL scheme└╕╖╬ ╕«┤┘└╠╖║╝╟╟╥ ╝÷ └╓┤┘. ┐╣╕ª ╡Θ╛ε,
┤┘└╜░· ░░└╠ <code>news:newsgroup</code>└╕╖╬ ╕«┤┘└╠╖║╝╟╟╥
╝÷ └╓┤┘</p>
<example><pre>
RewriteRule ^anyurl xredirect:news:newsgroup
</pre></example>
<note>┴╓└╟: └º└╟ ╞»║░╟╤ "┼δ░·" ▒╘─ó└╗ ╗τ┐δ╟╧┐⌐
<code>xredirect:</code>╕ª ╕╢┴÷╕╖┐í ╚«└σ╟╪╛▀ ╟╧▒Γ╢º╣«┐í
▒╘─ó┐í <code>[R]</code>└╠│¬ <code>[R,L]</code>└╗ ╗τ┐δ╟╧╕Θ
╛╚╡╚┤┘.</note>
</dd>
</dl>
</section>
<section>
<title>└·└σ╝╥ ┴ó▒┘ ┴▀░Φ(multiplexer)</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p><a href="http://www.perl.com/CPAN">http://www.perl.com/CPAN</a>┐í
└╓┤┬ ┤δ┤▄╟╤ CPAN (Comprehensive Perl Archive Network)└╗
╛╞┤┬░í? └╠ ┴╓╝╥┤┬ ╝╝░Φ┐í ╚≡╛ε┴° ┐⌐╖» CPAN ╣╠╖» FTP
╝¡╣÷┴▀ ┼¼╢≤└╠╛≡╞«┐í ░í▒ε└╠ └╓┤┬ ╝¡╣÷╖╬ ╕«┤┘└╠╖║╝╟╟╤┤┘.
└╠╕ª FTP ┴ó▒┘ ┴▀░Φ ╝¡║±╜║╢≤░φ ╟╤┤┘. CPAN└║ CGI ╜║┼⌐╕│╞«╕ª
╗τ┐δ╟╧┴÷╕╕, <module>mod_rewrite</module>╕ª ╗τ┐δ╟╧┐⌐
║±╜┴╟╧░╘ ╕╕╡Θ ╝÷ └╓└╗▒ε?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╕╒└· <module>mod_rewrite</module> 3.0.0 ╣÷└ⁿ║╬┼═
╕«┤┘└╠╖║╝╟┐í "<code>ftp:</code>" scheme└╗ ╗τ┐δ╟╥ ╝÷
└╓┤┘. ┤┘└╜└╕╖╬ ┼¼╢≤└╠╛≡╞«└╟ ├╓╗≤└º ╡╡╕▐└╬└╗ <directive
module="mod_rewrite">RewriteMap</directive>░· ░░└╠
╗τ┐δ╟╧┐⌐ └º─í╕ª ├▀┴ñ╟╥ ╝÷ └╓┤┘. ║╣└Γ╚≈ ┐½└╬ ▒╘─ó┐í╝¡
├╓╗≤└º ╡╡╕▐└╬└╗ ┴▀░Φ╕╩└╟ ┼░╖╬ ╗τ┐δ╟╤┤┘.</p>
<example><pre>
RewriteEngine on
RewriteMap multiplex txt:/path/to/map.cxan
RewriteRule ^/CxAN/(.*) %{REMOTE_HOST}::$1 [C]
RewriteRule ^.+\.<strong>([a-zA-Z]+)</strong>::(.*)$ ${multiplex:<strong>$1</strong>|ftp.default.dom}$2 [R,L]
</pre></example>
<example><pre>
##
## map.cxan -- Multiplexing Map for CxAN
##
de ftp://ftp.cxan.de/CxAN/
uk ftp://ftp.cxan.uk/CxAN/
com ftp://ftp.cxan.com/CxAN/
:
##EOF##
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╜├░ú┐í ╡√╕Ñ └τ└█╝║</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╜├░ú┐í ╡√╢≤ ┤┘╕Ñ │╗┐δ└╗ ╝¡║±╜║╟╧┤┬ ░µ┐∞ ╕╣└║ └Ñ░ⁿ╕«└┌┤┬
└ß╜├ ╞»║░╟╤ ╞Σ└╠┴÷╖╬ ╕«┤┘└╠╖║╝╟╟╧▒Γ└º╟╪ CGI ╜║┼⌐╕│╞«╕ª
╗τ┐δ╟╤┤┘. <module>mod_rewrite</module>╖╬┤┬ ╛ε╢╗░╘
╟╥ ╝÷ └╓┤┬░í?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└τ└█╝║ ┴╢░╟┐í╝¡ ╗τ┐δ╟╥ ╝÷ └╓┤┬ ┐⌐╖» <code>TIME_xxx</code>
║»╝÷░í └╓┤┘. ║»╝÷┐═ ╞»║░╟╤ ╗τ└ⁿ╝°╝¡ ║±▒│
<code><STRING</code>, <code>>STRING</code>,
<code>=STRING</code>└╗ ╗τ┐δ╟╧┐⌐ ╜├░ú┐í ╡√╢≤ ╕«┤┘└╠╖║╝╟╟╥
╝÷ └╓┤┘:</p>
<example><pre>
RewriteEngine on
RewriteCond %{TIME_HOUR}%{TIME_MIN} >0700
RewriteCond %{TIME_HOUR}%{TIME_MIN} <1900
RewriteRule ^foo\.html$ foo.day.html
RewriteRule ^foo\.html$ foo.night.html
</pre></example>
<p>URL <code>foo.html</code>└╗ ┐Σ├╗╟╧╕Θ
<code>07:00-19:00</code> ╡┐╛╚ <code>foo.day.html</code>
│╗┐δ└╗ ╝¡║±╜║╟╧░φ, │¬╕╙┴÷ ╜├░ú ╡┐╛╚
<code>foo.night.html</code> │╗┐δ└╗ ╝¡║±╜║╟╤┤┘. ╚¿╞Σ└╠┴÷┐í╝¡
╗τ┐δ╟╧▒Γ ┴┴└║ ▒Γ┤╔└╠┤┘...</p>
</dd>
</dl>
</section>
<section>
<title>YYYY╕ª XXXX╖╬ └╠└ⁿ╟╤ ░µ┐∞ ┐¬╚ú╚»</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>┐⌐╖» <code>.html</code> ╞─└╧└╗ <code>.phtml</code>╖╬
║»╚»╟╧┤┬ ╡ε <code>document.YYYY</code>╕ª
<code>document.XXXX</code>╖╬ └╠└ⁿ╟╤╚─ ┐¬╚ú╚»(backward
compatibility) URL└╗ (░í╗≤└√└╕╖╬ ┴╕└τ╟╧░╘) ╕╕╡Θ ╝÷
└╓│¬?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└╠╕º└╗ ▒Γ║╗└╠╕º└╕╖╬ └τ└█╝║╟╤╚─ ╗⌡╖╬┐ε ╚«└σ└┌╕ª
░í┴° ╞─└╧└╠ └╓┤┬┴÷ ░╦╗τ╟╤┤┘. └╓┤┘╕Θ ▒╫ ╞─└╧╕φ└╗ ╗τ┐δ╟╧░φ,
╛°└╕╕Θ URL└╗ ┐°╖í ╗≤┼┬╖╬ └τ└█╝║╟╤┤┘.</p>
<example><pre>
# ╣«╝¡.html └╠ ╛°░φ
# ╣«╝¡.phtml ╕╕ └╓┤┬ ░µ┐∞
# ╣«╝¡.html └╗ ╣«╝¡.phtml ╖╬
# └τ└█╝║╟╧┤┬ ┐¬╚ú╚» ▒╘─ó
RewriteEngine on
RewriteBase /~quux/
# ▒Γ║╗└╠╕º└╗ ├ú░φ, ├ú╛╥┤┘┤┬ ╗τ╜╟└╗ ▒Γ╛∩╟╤┤┘
RewriteRule ^(.*)\.html$ $1 [C,E=WasHTML:yes]
# ╞─└╧└╠ └╓┤┘╕Θ ╣«╝¡.phtml ╖╬ └τ└█╝║╟╤┤┘
RewriteCond %{REQUEST_FILENAME}.phtml -f
RewriteRule ^(.*)$ $1.phtml [S=1]
# ╛╞┤╧╕Θ ╛╒┐í╝¡ ├ú└║ ▒Γ║╗└╠╕º└╗ ╡╟╡╣╕░┤┘
RewriteCond %{ENV:WasHTML} ^yes$
RewriteRule ^(.*)$ $1.html
</pre></example>
</dd>
</dl>
</section>
</section>
<section id="content">
<title>─┴┼┘├≈ ┤┘╖τ▒Γ</title>
<section>
<title>╗⌡╖╬ └╠└ⁿ (░¿├▀▒Γ)</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>├╓▒┘ <code>foo.html</code>└╗ <code>bar.html</code>╖╬
║»░µ╟╧░φ ┐¬╚ú╚»╝║└╗ └º╟╪ └╠└ⁿ URL└╗ ░Φ╝╙ ┴ª░°╟╧░φ
╜═┤┘░φ ░í┴ñ╟╧└┌. ╗τ┐δ└┌┤┬ └╠└ⁿ URL└╠ ║»░µ╡╟╛·┤┘┤┬
╗τ╜╟└╗ ┤½─í├ñ┴÷ ╕°╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>┤┘└╜ ▒╘─ó└╕╖╬ └╠└ⁿ URL└╗ │╗║╬└√└╕╖╬ ╗⌡╖╬┐ε URL╖╬
└τ└█╝║╟╤┤┘:</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^<strong>foo</strong>\.html$ <strong>bar</strong>.html
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╗⌡╖╬ └╠└ⁿ (╛╦╕«▒Γ)</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>┤┘╜├ <code>foo.html</code>└╗ <code>bar.html</code>╖╬
║»░µ╟╧░φ ┐¬╚ú╚»╝║└╗ └º╟╪ └╠└ⁿ URL└╗ ░Φ╝╙ ┴ª░°╟╧░φ
╜═┤┘░φ ░í┴ñ╟╧└┌. ▒╫╖»│¬ └╠┴ª┤┬ └╠└ⁿ URL└╗ ╗τ┐δ╟╧╕Θ
╗τ┐δ└┌┐í░╘ ╗⌡╖╬┐ε URL└╗ ╚∙╞«╖╬ ╛╦╖┴┴╪┤┘. ┴∩, ║Ω╢≤┐∞└·
┴╓╝╥├ó└╠ ║»╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╗⌡╖╬┐ε URL╖╬ HTTP ╕«┤┘└╠╖║╝╟╟╧┤┘. ▒╫╖»╕Θ ║Ω╢≤┐∞└·░í
╗⌡╖╬┐ε URL╕ª ║╕└╠░φ ║»░µ╗τ╜╟└╗ ╗τ┐δ└┌░í ╛╦░╘╡╚┤┘:</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^<strong>foo</strong>\.html$ <strong>bar</strong>.html [<strong>R</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>║Ω╢≤┐∞└·┐í ╡√╕Ñ │╗┐δ</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>├╓╝╥╟╤ ┴▀┐Σ╟╤ ├╓╗≤└º ╞Σ└╠┴÷┤┬ ║Ω╢≤┐∞└·┐í ├╓└√╚¡╡╚
│╗┐δ└╕╖╬ ╝¡║±╜║╟╪╛▀╟╥ ░µ┐∞░í └╓┤┘. ┴∩, ├╓╜┼ Netscape
║Ω╢≤┐∞└·┐í░╘┤┬ ├╓╗≤└╟ ╣÷└ⁿ└╗, Lynx ║Ω╢≤┐∞└·┐í░╘┤┬
├╓└· ╣÷└ⁿ└╗, │¬╕╙┴÷ ║Ω╢≤┐∞└·┐í┤┬ ╞≥▒╒└√└╬ ╣÷└ⁿ└╗
┴ª░°╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>║Ω╢≤┐∞└·░í │╗┐δ╟∙╗≤└╗ └º╟╪ └┌╜┼└╟ ┴╛╖∙┐í ┤δ╟╤ ┴ñ║╕╕ª
┴ª░°╟╧┴÷ ╛╩▒Γ╢º╣«┐í │╗┐δ╟∙╗≤└╗ ╗τ┐δ╟╥ ╝÷ ╛°┤┘. ┤δ╜┼
HTTP "User-Agent" ╟∞┤⌡╕ª ╗τ┐δ╟╤┤┘. ┤┘└╜ ▒╘─ó└║ HTTP
"User-Agent" ╟∞┤⌡░í "Mozilla/3"└╕╖╬ ╜├└█╟╧╕Θ
<code>foo.html</code> ╞Σ└╠┴÷╕ª <code>foo.NS.html</code>╖╬
└τ└█╝║╟╧░φ └τ└█╝║└╗ ┴▀┤▄╟╤┤┘. ║Ω╢≤┐∞└·░í "Lynx"│¬
"Mozilla" ╣÷└ⁿ 1 ╚ñ└║ 2╢≤╕Θ URL└║
<code>foo.20.html</code>└╠ ╡╚┤┘. │¬╕╙┴÷ ║Ω╢≤┐∞└·┤┬
<code>foo.32.html</code> ╞Σ└╠┴÷╕ª ╣▐┤┬┤┘. ╛╞╖í ▒╘─ó└╠
└╠ └█╛≈└╗ ╟╤┤┘:</p>
<example><pre>
RewriteCond %{HTTP_USER_AGENT} ^<strong>Mozilla/3</strong>.*
RewriteRule ^foo\.html$ foo.<strong>NS</strong>.html [<strong>L</strong>]
RewriteCond %{HTTP_USER_AGENT} ^<strong>Lynx/</strong>.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^<strong>Mozilla/[12]</strong>.*
RewriteRule ^foo\.html$ foo.<strong>20</strong>.html [<strong>L</strong>]
RewriteRule ^foo\.html$ foo.<strong>32</strong>.html [<strong>L</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╡┐└√ ╣╠╖»</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>┐▄║╬ ╚ú╜║╞«┐í ┐∞╕« ╗τ└╠╞«╖╬ ░í┴«┐└░φ ╜═└║ ┴┴└║
└Ñ╞Σ└╠┴÷░í └╓┤┘░φ ░í┴ñ╟╧└┌. FTP ╝¡╣÷└╟ ░µ┐∞ ┴≈┴ó ┐▄║╬
└┌╖ß└╟ ├╓╜┼║╣╗τ║╗└╗ └»┴÷╟╧┤┬ <code>mirror</code> ╟┴╖╬▒╫╖Ñ└╗
╗τ┐δ╟╥ ╝÷ └╓░φ, └Ñ╝¡╣÷╢≤╕Θ HTTP╖╬ ║±╜┴╟╤ └█╛≈└╗ ╟╧┤┬
<code>webcopy</code> ╟┴╖╬▒╫╖Ñ└╗ ╗τ┐δ╟╥ ╝÷ └╓┤┘. ▒╫╖»│¬
╡╬ ╣µ╣² ╕≡╡╬ ┤▄┴í└╠ └╓┤┘: ║╣╗τ║╗└║ ░í▓√╛┐ ╟┴╖╬▒╫╖Ñ└╗
╜╟╟α╟╪┴┘ ╢º╕╕ ├╓╜┼╞╟└╕╖╬ └»┴÷╡╚┤┘. ┴≈┴ó ▒╕╝║╟╪╛▀╟╧┤┬
┴ñ└√└╬ ╣╠╖»░í ╛╞┤╧╢≤╕Θ ┴┴░┌┤┘. ┤δ╜┼ (┐▄║╬ ╚ú╜║╞«┐í╝¡
└┌╖ß░í ░╗╜┼╡╟╕Θ) ╟╩┐Σ╟╥╢º └┌╡┐└╕╖╬ └┌╖ß╕ª ░╗╜┼╟╧┤┬
╡┐└√ ╣╠╖»░í ╟╩┐Σ╟╧┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└╠╕ª └º╟╪ <dfn>Proxy Throughput</dfn> ▒Γ┤╔└╗ (╟├╖í▒╫
<code>[P]</code>) ╗τ┐δ╟╧┐⌐ ┐▄║╬ └Ñ╞Σ└╠┴÷ ╚ñ└║ ┐▄║╬
└Ñ░°░ú └ⁿ├╝╕ª ┐∞╕« └╠╕º░°░ú└╕╖╬ ┤δ└└╟╤┤┘:</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^<strong>hotsheet/</strong>(.*)$ <strong>http://www.tstimpreso.com/hotsheet/</strong>$1 [<strong>P</strong>]
</pre></example>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^<strong>usa-news\.html</strong>$ <strong>http://www.quux-corp.com/news/index.html</strong> [<strong>P</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╡┐└√ ┐¬╣╠╖»</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>...</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<example><pre>
RewriteEngine on
RewriteCond /mirror/of/remotesite/$1 -U
RewriteRule ^http://www\.remotesite\.com/(.*)$ /mirror/of/remotesite/$1
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╛°┤┬ └┌╖ß╕ª └╬╞«╢≤│▌┐í╝¡ ░í┴«┐└▒Γ</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╜╟┴ª └┌╖ß╕ª ╣µ╚¡║«└╠ ║╕╚ú╟╧┤┬ (│╗║╬) └╬╞«╢≤│▌ └Ñ╝¡╣÷┐í
(<code>www2.quux-corp.dom</code>) └·└σ╟╧╕Θ╝¡, ▒Γ╛≈└╟
(┐▄║╬) └╬┼═│▌ └Ñ╝¡╣÷╕ª (<code>www.quux-corp.dom</code>)
╜╟╟α╟╧┤┬ ░═├│╖│ ║╕└╠░╘ ╟╤┤┘. ┐▄║╬ └Ñ╝¡╣÷┤┬ ┐Σ├╗╟╤
└┌╖ß╕ª │╗║╬ └Ñ╝¡╣÷┐í╝¡ ░í┴«┐┬┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╕╒└· ╣µ╚¡║«└╠ │╗║╬ └Ñ╝¡╣÷╕ª ║╕╚ú╟╧░φ ┐▄║╬ └Ñ╝¡╣÷╕╕└╠
│╗║╬ └Ñ╝¡╣÷┐í╝¡ └┌╖ß╕ª ╛≥└╗ ╝÷ └╓░╘ ╟╤┤┘. ┤┘└╜░· ░░└╠
╞╨┼╢╟╩┼═╕╡ ╣µ╚¡║«└╗ ╝│┴ñ╟╤┤┘:</p>
<example><pre>
<strong>ALLOW</strong> Host www.quux-corp.dom Port >1024 --> Host www2.quux-corp.dom Port <strong>80</strong>
<strong>DENY</strong> Host * Port * --> Host www2.quux-corp.dom Port <strong>80</strong>
</pre></example>
<p>╜╟┴ª ╝│┴ñ╣«╣²┐í ╛╦╕┬░╘ ░φ├─╢≤. ╛°┤┬ └┌╖ß╕ª │╗║╬└√└╕╖╬
proxy throughput ▒Γ┤╔└╗ ┼δ╟╪ ┐Σ├╗╟╧┤┬
<module>mod_rewrite</module> ▒╘─ó└╗ └█╝║╟╤┤┘:</p>
<example><pre>
RewriteRule ^/~([^/]+)/?(.*) /home/$1/.www/$2
RewriteCond %{REQUEST_FILENAME} <strong>!-f</strong>
RewriteCond %{REQUEST_FILENAME} <strong>!-d</strong>
RewriteRule ^/home/([^/]+)/.www/?(.*) http://<strong>www2</strong>.quux-corp.dom/~$1/pub/$2 [<strong>P</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╖╬╡σ╣δ╖▒╜╠ (║╬╟╧ ║╨╗Ω╟╧▒Γ)</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p><code>www.foo.com</code>└╟ ┼δ╜┼╖«└╗
<code>www[0-5].foo.com</code> (├╤ ╝¡╣÷ 6┤δ)└╕╖╬ ║╨╗Ω╟╧░φ
╜═┤┘. ╛ε╢╗░╘ ╟╧┤┬░í?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╕┼┐∞ ┤┘╛τ╟╤ ╣µ╣²└╕╖╬ └╠ ╣«┴ª╕ª ╟╪░ß╟╥ ╝÷ └╓┤┘.
╕╒└· DNS╕ª ╗τ┐δ╟╤ └▀ ╛╦╖┴┴° ╣µ╣²└╗ ╝│╕φ╟╧░φ,
<module>mod_rewrite</module>╕ª ╗τ┐δ╟╧┤┬ ░µ┐∞╕ª ╗∞╞∞║╕└┌:</p>
<ol>
<li>
<strong>DNS Round-Robin</strong>
<p>░í└σ ░ú┤▄╟╤ ╖╬╡σ╣δ╖▒╜╠ ╣µ╣²└║ <code>BIND</code>└╟
DNS round-robin ╣µ╜─└╗ ╗τ┐δ╟╧┤┬ ░═└╠┤┘. ┤┘└╜░·
░░└╠ DNS A(address) ╖╣─┌╡σ┐í
<code>www[0-9].foo.com</code>└╗ ╝│┴ñ╟╤┤┘.</p>
<example><pre>
www0 IN A 1.2.3.1
www1 IN A 1.2.3.2
www2 IN A 1.2.3.3
www3 IN A 1.2.3.4
www4 IN A 1.2.3.5
www5 IN A 1.2.3.6
</pre></example>
<p>▒╫╕«░φ ┤┘└╜ ╟╫╕±└╗ ├▀░í╟╤┤┘:</p>
<example><pre>
www IN CNAME www0.foo.com.
IN CNAME www1.foo.com.
IN CNAME www2.foo.com.
IN CNAME www3.foo.com.
IN CNAME www4.foo.com.
IN CNAME www5.foo.com.
IN CNAME www6.foo.com.
</pre></example>
<p>└▀╕°╡╚ ░═├│╖│ ║╕└╠┴÷╕╕, ╜╟┴ª╖╬ <code>BIND</code>└╟
└╟╡╡╡╚ ▒Γ┤╔└╠┤┘. └╠┴ª <code>www.foo.com</code>└╗
├ú└╕╕Θ, <code>BIND</code>┤┬ ╕┼╣° ╝°╝¡╕ª ┴╢▒▌╛┐
╣┘▓π░í╕τ <code>www0-www6</code>└╗ ╣▌╚»╟╤┤┘. ▒╫╖í╝¡
┼¼╢≤└╠╛≡╞«╡Θ└╗ ┐⌐╖» ╝¡╣÷╖╬ ║╨╗Ω╟╤┤┘. ▒╫╖»│¬ DNS
░╦╗÷ ░ß░·░í │╫╞«┐≈└╟ ┤┘╕Ñ │╫└╙╝¡╣÷┐í ─│╜¼╡╟┐⌐
<code>www.foo.com</code>└╗ ├ú└║ ░ß░·░í ╞»┴ñ
<code>wwwN.foo.com</code>└╠╕Θ ┼¼╢≤└╠╛≡╞«└╟ ┤┘└╜
┐Σ├╗╡Θ╡╡ ░░└║ <code>wwwN.foo.com</code>└╕╖╬
║╕│╗┴÷▒Γ╢º╣«┐í ┐╧║«╟╤ ╖╬╡σ╣δ╖▒╜╠ ▒Γ╣²└╠ ╛╞┤╘└╗
┴╓└╟╟╧╢≤. ▒╫╖»│¬ ┼⌐░╘ ║╕╕Θ ┐Σ├╗└╠ ┐⌐╖» └Ñ╝¡╣÷┐í
║╨╗Ω╡╟╣╟╖╬ ╚┐░·░í ┴┴┤┘.</p>
</li>
<li>
<strong>DNS ╖╬╡σ╣δ╖▒╜╠</strong>
<p><a href="http://www.stanford.edu/~schemers/docs/lbnamed/lbnamed.html">http://www.stanford.edu/~schemers/docs/lbnamed/lbnamed.html</a>┐í
└╓┤┬ <code>lbnamed</code> ╟┴╖╬▒╫╖Ñ└╗ ╗τ┐δ╟╧┐⌐
┴ñ▒│╟╤ DNS▒Γ╣▌ ╖╬╡σ╣δ╖▒╜╠└╗ ╟╥ ╝÷ └╓┤┘. DNS░í
╜╟┴ª ╖╬╡σ╣δ╖▒╜╠└╗ ╟╧╡╡╖╧ ╕╕╡σ┤┬ ┐⌐╖» ╡╡▒╕┐═ Perl
5 ╟┴╖╬▒╫╖Ñ└╠┤┘.</p>
</li>
<li>
<strong>Proxy Throughput Round-Robin</strong>
<p>└╠ ╣µ╣²└║ <module>mod_rewrite</module>┐═ proxy
throughput ▒Γ┤╔└╗ ╗τ┐δ╟╤┤┘. ╕╒└· DNS┐í ┤┘└╜ ╟╫╕±└╗
╗τ┐δ╟╧┐⌐ <code>www0.foo.com</code>└╠ ╜╟┴ª
<code>www.foo.com</code>└╗ └ⁿ┤π╟╧░╘ ╟╤┤┘</p>
<example><pre>
www IN CNAME www0.foo.com.
</pre></example>
<p>▒╫╕«░φ <code>www0.foo.com</code>└╗ ╟┴╖╧╜├└ⁿ┐δ
╝¡╣÷╖╬ ║»░µ╟╤┤┘. ┴∩, URL└╗ ╣▐└╕╕Θ ╝¡╣÷┤┬ │╗║╬
╟┴╖╧╜├╕ª ┼δ╟╪ ┤┘╕Ñ 5┤δ ╝¡╣÷┴▀ (<code>www1-www5</code>)
╟╤┤δ╖╬ ║╕│╗▒Γ╕╕ ╟╤┤┘. └╠╕ª └º╟╪ ╕╒└· ╕≡╡τ URL└╗
╖╬╡σ╣δ╖▒╜╠ ╜║┼⌐╕│╞« <code>lb.pl</code>╖╬ ║╕│╗┤┬
▒╘─ó└╗ ╕╕╡τ┤┘.</p>
<example><pre>
RewriteEngine on
RewriteMap lb prg:/path/to/lb.pl
RewriteRule ^/(.+)$ ${lb:$1} [P,L]
</pre></example>
<p><code>lb.pl</code>└╗ └█╝║╟╤┤┘:</p>
<example><pre>
#!/path/to/perl
##
## lb.pl -- ╖╬╡σ╣δ╖▒╜╠ ╜║┼⌐╕│╞«
##
$| = 1;
$name = "www"; # ▒Γ║╗ ╚ú╜║╞«╕φ
$first = 1; # ├╣╣°┬░ ╝¡╣÷ (└┌╜┼└╠ 0└╠▒Γ ╢º╣«┐í, 0└╗ ╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘)
$last = 5; # round-robin┐í╝¡ ╕╢┴÷╕╖ ╝¡╣÷
$domain = "foo.dom"; # ╡╡╕▐└╬╕φ
$cnt = 0;
while (<STDIN>) {
$cnt = (($cnt+1) % ($last+1-$first));
$server = sprintf("%s%d.%s", $name, $cnt+$first, $domain);
print "http://$server/$_";
}
##EOF##
</pre></example>
<note>╕╢┴÷╕╖ ┴╓└╟: ┐╓ └╠ ╣µ╣²└╠ └»┐δ╟╤░í?
<code>www0.foo.com</code>┐í ║╬┤π└╠ ░í┴÷╛╩┤┬░í?
╣░╖╨, ║╬┤π└╠ ╡╚┤┘. ▒╫╖»│¬ ┤▄╝°╟╤ proxy throughput
┐Σ├╗╕╕ ╟╧▒Γ╢º╣«┐í ▒ª┬·┤┘! ╕≡╡τ SSI, CGI, ePerl
╡ε└║ └ⁿ└√└╕╖╬ ┤┘╕Ñ ╝¡╣÷░í ├│╕«╟╤┤┘. └╠░═└╠ ╟┘╜╔└╠┤┘.</note>
</li>
<li>
<strong>╟╧╡σ┐■╛ε/TCP Round-Robin</strong>
<p>╟╧╡σ┐■╛ε╕ª ╗τ┐δ╟╤ ╟╪░ß├Ñ╡╡ └╓┤┘. Cisco┤┬ TCP/IP
╝÷┴╪┐í╝¡ ╖╬╡σ╣δ╖▒╜╠└╗ ╟╧┤┬ LocalDirector╢≤┤┬ ▒½╣░└╗
╞╟┤┘. ╜╟┴ª╖╬┤┬ └Ñ╝¡╣÷▒║ ╛╒┤▄┐í └º─í╟╧┤┬ └╧┴╛└╟
╚╕╖╬╝÷┴╪ ░╘└╠╞«┐■└╠┤┘. └┌▒▌└╠ ├µ║╨╟╧░φ ░φ╝║┤╔
╟╪░ß├Ñ└╠ ╟╩┐Σ╟╧┤┘╕Θ └╠░═└╗ ╗τ┐δ╟╧╢≤.</p>
</li>
</ol>
</dd>
</dl>
</section>
<section>
<title>╗⌡╖╬┐ε MIME-type, ╗⌡╖╬┐ε ╝¡║±╜║</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>│╫╞«┐≈┐í┤┬ ╕┌┴° CGI ╟┴╖╬▒╫╖Ñ╡Θ└╠ ╕╣┤┘. ▒╫╖»│¬ ╗τ┐δ╟╧▒Γ
╣°░┼╖»┐÷╝¡ ╕╣└║ └Ñ░ⁿ╕«└┌░í ╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘. ╛╞╞──í└╟
MIME-type┐í ╡√╕Ñ Action ╟┌╡Θ╖» ▒Γ┤╔╡╡ CGI ╟┴╖╬▒╫╖Ñ└╠
╞»║░╟╤ URL└╗ (┴ñ╚«╚≈ <code>PATH_INFO</code>┐═
<code>QUERY_STRINGS</code>) ╟┴╖╬▒╫╖Ñ└╟ └╘╖┬└╕╖╬ ╗τ┐δ╟╧┴÷
╛╩└╗ ╢º╕╕ └√└²╟╧┤┘. ╕╒└·, ╚«└σ└┌░í (secure CGI╕ª ┴┘┐⌐)
<code>.scgi</code>└╬ ╞─└╧└╗ └»╕φ╟╤ <code>cgiwrap</code>
╟┴╖╬▒╫╖Ñ└╕╖╬ ├│╕«╟╧▒Γ└º╟╪ ╗⌡╖╬┐ε type└╗ ╝│┴ñ╟╤┤┘.
╣«┴ª┤┬ (└º┐í╝¡ ║╗) └╧░ⁿ╡╚ URL ▒╕┴╢╕ª ╗τ┐δ╟╧┤┬ ░µ┐∞
╗τ┐δ└┌ ╚¿╡≡╖║┼Σ╕«░í <code>/u/user/foo/bar.scgi</code>░░└║
URL└╬ ┴í└╠┤┘. <code>cgiwrap</code>┤┬
<code>/~user/foo/bar.scgi/</code> ╟ⁿ╜─└╟ URL└╗
┐°╟╧▒Γ╢º╣«└╠┤┘. ┤┘└╜ ▒╘─ó└╠ ╣«┴ª╕ª ╟╪░ß╟╤┤┘:</p>
<example><pre>
RewriteRule ^/[uge]/<strong>([^/]+)</strong>/\.www/(.+)\.scgi(.*) ...
... /internal/cgi/user/cgiwrap/~<strong>$1</strong>/$2.scgi$3 [NS,<strong>T=application/x-http-cgi</strong>]
</pre></example>
<p>└╠┴ª ┤┘╕Ñ ╕┌┴° ╟┴╖╬▒╫╖Ñ, (URL ╟╧└º╞«╕«┐í ┤δ╟╤
<code>access.log</code>╕ª ├Γ╖┬╟╧┤┬) <code>wwwlog</code>┐═
(URL ╟╧└º╞«╕«┐í Glimpse╕ª ╜╟╟α╟╧┤┬) <code>wwwidx</code>░í
└╓┤┘░φ ░í┴ñ╟╧└┌. ┐∞╕«┤┬ ╟┴╖╬▒╫╖Ñ┐í░╘ └█╛≈╟╥ ┤δ╗≤└╬
URL ┐╡┐¬└╗ ╛╦╖┴┴α╛▀ ╟╤┤┘. ▒╫╖»│¬ ┐Σ├╗╟╥╢º╕╢┤┘ ╟╫╗≤
└√╛ε┴α╛▀ ╟╧▒Γ╢º╣«┐í ▒≥▓√╟╧┴÷ ╛╩┤┘. ┴∩, ║╕┼δ
<code>/u/user/foo/</code>┐í ┤δ╟╪ <code>swwidx</code>
╟┴╖╬▒╫╖Ñ└╗ ╜╟╟α╟╤┤┘╕Θ ┤┘└╜░· ░░└║ ╕╡┼⌐╕ª ╗τ┐δ╟╤┤┘</p>
<example><pre>
/internal/cgi/user/swwidx?i=/u/user/foo/
</pre></example>
<p>▒≥▓√╟╧┴÷ ╛╩┤┘. ╕╡┼⌐┐í ┐╡┐¬└╟ └º─í<strong>┐═</strong>
CGI └º─í╕ª <strong>╕≡╡╬</strong> └√╛ε╛▀ ╟╧▒Γ╢º╣«└╠┤┘.
┐╡┐¬└╗ └τ▒╕╝║╟╤┤┘╕Θ ┐⌐╖» ╟╧└╠╞█╕╡┼⌐╕ª ╝÷┴ñ╟╧┤┬╡Ñ ╕╣└║
╜├░ú└╠ ░╔╕▒ ░═└╠┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╟╪░ß├Ñ└║ └┌╡┐└╕╖╬ └√└²╟╤ CGI╕ª ╜╟╟α╟╧┤┬ ╗⌡╖╬┐ε
╞»║░╟╤ URL ╟ⁿ╜─└╗ ╕╕╡σ┤┬ ░═└╠┤┘. ┤┘└╜░· ░░└╠ ╝│┴ñ╟╤┤┘:</p>
<example><pre>
RewriteRule ^/([uge])/([^/]+)(/?.*)/\* /internal/cgi/user/wwwidx?i=/$1/$2$3/
RewriteRule ^/([uge])/([^/]+)(/?.*):log /internal/cgi/user/wwwlog?f=/$1/$2$3
</pre></example>
<p>└╠┴ª <code>/u/user/foo/</code>└╗ ░╦╗÷╟╧┤┬ ╕╡┼⌐┤┬
┤┘└╜░· ░░┤┘</p>
<example><pre>
HREF="*"
/u/user/foo/* (???)
</pre></example>
<p>│╗║╬└√└╕╖╬ ┤┘└╜░· ░░└╠ └┌╡┐║»╚»╡╚┤┘</p>
<example><pre>
/internal/cgi/user/wwwidx?i=/u/user/foo/
</pre></example>
<p>░░└║ ╣µ╣²└╕╖╬ ╕╡┼⌐ ╡┌┐í <code>:log</code>╕ª ╗τ┐δ╟╧┐⌐
┴ó▒┘ ╖╬▒╫ CGI ╟┴╖╬▒╫╖Ñ└╗ ╜╟╟α╟╥ ╝÷ └╓┤┘.</p>
</dd>
</dl>
</section>
<section>
<title>┴ñ└√┐í╝¡ ╡┐└√└╕╖╬</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╛ε╢╗░╘ ║Ω╢≤┐∞└·┐═ ╗τ┐δ└┌░í ╕≡╕ú░╘ └┌┐¼╜║╖┤░╘ ┴ñ└√
╞Σ└╠┴÷ <code>foo.html</code>└╗ ╡┐└√└╬ <code>foo.cgi</code>╖╬
║»░µ╟╥ ╝÷ └╓│¬.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>URL└╗ CGI ╜║┼⌐╕│╞«╖╬ └τ└█╝║╟╧░φ, MIME-type└╗ ╝÷┴ñ╟╧┐⌐
CGI ╜║┼⌐╕│╞«╖╬ ╜╟╟α╟╧░╘ ╟╤┤┘. ▒╫╖í╝¡
<code>/~quux/foo.html</code>╕ª ┐Σ├╗╟╧╕Θ │╗║╬└√└╕╖╬
<code>/~quux/foo.cgi</code>╕ª ╜╟╟α╟╧░╘ ╡╚┤┘.</p>
<example><pre>
RewriteEngine on
RewriteBase /~quux/
RewriteRule ^foo\.<strong>html</strong>$ foo.<strong>cgi</strong> [T=<strong>application/x-httpd-cgi</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>┴∩╝« ─┴┼┘├≈ └τ╗²╝║</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>└╠ ╣µ╣²└║ ╜╟╖╬ ║±▒Γ└╠┤┘: ╡┐└√└╕╖╬ ╞Σ└╠┴÷╕ª ╗²╝║╟╧┴÷╕╕,
┴ñ└√└╕╖╬ ╞Σ└╠┴÷╕ª ╝¡║±╜║╟╤┤┘. ┴∩, ╞Σ└╠┴÷┤┬ ╝°╝÷╟╧░╘
(╞─└╧╜├╜║┼█┐í╝¡ └╨└║ │╗┐δ└╗ ▒╫┤δ╖╬) ┴ñ└√ ╞Σ└╠┴÷╖╬
└ⁿ┤▐╡╟┴÷╕╕, ╛°└╗ ░µ┐∞ └Ñ╝¡╣÷░í ╡┐└√└╕╖╬ ╗²╝║╟╤┤┘.
▒╫╖»╕Θ ┤⌐░í (╚ñ└║ cron └█╛≈└╠) ┴ñ└√ ─┴┼┘├≈╕ª ┴÷┐∞┴÷╛╩┤┬
╟╤ CGI░í ╗²╝║╟╤ ╞Σ└╠┴÷╕ª ┴ñ└√└╕╖╬ ╝¡║±╜║╟╤┤┘. ─┴┼┘├≈╕ª
┴÷┐∞╕Θ │╗┐δ└╗ ░╗╜┼╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
┤┘└╜ ▒╘─ó└╗ ╗τ┐δ╟╤┤┘:
<example><pre>
RewriteCond %{REQUEST_FILENAME} <strong>!-s</strong>
RewriteRule ^page\.<strong>html</strong>$ page.<strong>cgi</strong> [T=application/x-httpd-cgi,L]
</pre></example>
<p>┐⌐▒Γ╝¡ <code>page.html</code>╕ª ┐Σ├╗╟╥╢º
<code>page.html</code>└╠ ╛°░┼│¬ ╞─└╧┼⌐▒Γ░í 0└╬ ░µ┐∞
│╗║╬└√└╕╖╬ <code>page.cgi</code>╕ª ╜╟╟α╟╤┤┘. ┐⌐▒Γ╝¡
║±░ß└║ <code>page.cgi</code>░í └╧╣▌└√└╬ CGI ╜║┼⌐╕│╞«┐═
░░└╠ <code>STDOUT</code>┐í ├Γ╖┬╟╧░φ, ├▀░í╖╬ ├Γ╖┬└╗
<code>page.html</code> ╞─└╧┐í └√┤┬┤┘. ╟╤╣° ╜╟╟α╟╤╚─
╝¡╣÷┤┬ <code>page.html</code>└╟ ┴ñ║╕╕ª ║╕│╜┤┘. └Ñ░ⁿ╕«└┌░í
░¡└τ╖╬ │╗┐δ└╗ ░╗╜┼╟╧░φ ╜═┤┘╕Θ, (║╕┼δ cron └█╛≈└╠)
<code>page.html</code>└╗ ┴÷┐∞▒Γ╕╕ ╟╧╕Θ ╡╚┤┘.</p>
</dd>
</dl>
</section>
<section>
<title>└┌╡┐└╕╖╬ ╗⌡╖╬ ░φ─º╟╧┤┬ ╣«╝¡</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>║╣└Γ╟╤ └Ñ╞Σ└╠┴÷╕ª ╕╕╡Θ╢º ╞φ┴²└┌░í │╗┐δ└╗ ╝÷┴ñ╟╥
╢º╕╢┤┘ └┌╡┐└╕╖╬ ╞Σ└╠┴÷╕ª ╗⌡╖╬ ░φ─º╟╧┤┬ └Ñ║Ω╢≤┐∞└·░í
└╓└╕╕Θ ╛≤╕╢│¬ ┴┴└╗▒ε? ║╥░í┤╔╟╤░í?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>░í┤╔╟╧┤┘! MIME multipart ▒Γ┤╔░· └Ñ╝¡╣÷ NPH ▒Γ┤╔,
<module>mod_rewrite</module>└╟ URL ┴╢└█ ┤╔╖┬└╗ ░ß╟╒╟╧╕Θ
╡╚┤┘. ╕╒└·, ╗⌡╖╬┐ε URL ▒Γ┤╔└╗ ╕╕╡τ┤┘: URL┐í
<code>:refresh</code>╕ª ├▀░í╟╧▒Γ╕╕ ╟╧╕Θ ╞─└╧╜├╜║┼█┐í╝¡
╝÷┴ñ╡╔ ╢º╕╢┤┘ ╗⌡╖╬ ░φ─º╟╤┤┘.</p>
<example><pre>
RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1
</pre></example>
<p>└╠┴ª ┤┘└╜ URL┐í ┴ó▒┘╟╧╕Θ</p>
<example><pre>
/u/foo/bar/page.html:refresh
</pre></example>
<p>┤┘└╜ URL└╗ │╗║╬└√└╕╖╬ ║╬╕Ñ┤┘</p>
<example><pre>
/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html
</pre></example>
<p>└╠┴ª NPH-CGI ╜║┼⌐╕│╞«╕╕ │▓╛╥┤┘. ║╕┼δ "╡╢└┌┐í░╘
┐¼╜└└╕╖╬ │▓░▄╡╥"└╠╢≤░φ ╕╗╟╧┴÷╕╕ ;-) │¬┤┬ └╠░═╡╡ ┴ª░°╟╤┤┘.</p>
<example><pre>
#!/sw/bin/perl
##
## nph-refresh -- NPH/CGI script for auto refreshing pages
## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
##
$| = 1;
# split the QUERY_STRING variable
@pairs = split(/&/, $ENV{'QUERY_STRING'});
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$name =~ tr/A-Z/a-z/;
$name = 'QS_' . $name;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
eval "\$$name = \"$value\"";
}
$QS_s = 1 if ($QS_s eq '');
$QS_n = 3600 if ($QS_n eq '');
if ($QS_f eq '') {
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print "<b>ERROR</b>: No file given\n";
exit(0);
}
if (! -f $QS_f) {
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print "<b>ERROR</b>: File $QS_f not found\n";
exit(0);
}
sub print_http_headers_multipart_begin {
print "HTTP/1.0 200 OK\n";
$bound = "ThisRandomString12345";
print "Content-type: multipart/x-mixed-replace;boundary=$bound\n";
&print_http_headers_multipart_next;
}
sub print_http_headers_multipart_next {
print "\n--$bound\n";
}
sub print_http_headers_multipart_end {
print "\n--$bound--\n";
}
sub displayhtml {
local($buffer) = @_;
$len = length($buffer);
print "Content-type: text/html\n";
print "Content-length: $len\n\n";
print $buffer;
}
sub readfile {
local($file) = @_;
local(*FP, $size, $buffer, $bytes);
($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
$size = sprintf("%d", $size);
open(FP, "<$file");
$bytes = sysread(FP, $buffer, $size);
close(FP);
return $buffer;
}
$buffer = &readfile($QS_f);
&print_http_headers_multipart_begin;
&displayhtml($buffer);
sub mystat {
local($file) = $_[0];
local($time);
($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
return $mtime;
}
$mtimeL = &mystat($QS_f);
$mtime = $mtime;
for ($n = 0; $n < $QS_n; $n++) {
while (1) {
$mtime = &mystat($QS_f);
if ($mtime ne $mtimeL) {
$mtimeL = $mtime;
sleep(2);
$buffer = &readfile($QS_f);
&print_http_headers_multipart_next;
&displayhtml($buffer);
sleep(5);
$mtimeL = &mystat($QS_f);
last;
}
sleep($QS_s);
}
}
&print_http_headers_multipart_end;
exit(0);
##EOF##
</pre></example>
</dd>
</dl>
</section>
<section>
<title>┤δ╖«└╟ ░í╗≤╚ú╜║╞«</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>░í╗≤╚ú╜║╞«░í ╕ε░│╕╕ └╓┤┘╕Θ ╛╞╞──í└╟ <directive
type="section" module="core">VirtualHost</directive>
▒Γ┤╔└╠ └▀ ╡┐└█╟╤┤┘. ▒╫╖»│¬ ░í╗≤╚ú╜║╞«░í ╝÷╣Θ░│ └╓┤┬
ISP╢≤╕Θ └╠ ▒Γ┤╔└╠ ├╓╝▒└║ ╛╞┤╧┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>└╠ ▒Γ┤╔└╗ ┴ª░°╟╧╖┴╕Θ <dfn>Proxy Throughput</dfn>
▒Γ┤╔└╗ (╟├╖í▒╫ <code>[P]</code>) ╗τ┐δ╟╧┐⌐ ┐▄║╬ └Ñ╞Σ└╠┴÷
╚ñ└║ └ⁿ├╝ ┐▄║╬ └Ñ┐╡┐¬└╗ ┐∞╕«└╟ └╠╕º░°░ú┐í ┤δ└└╟╤┤┘:</p>
<example><pre>
##
## vhost.map
##
www.vhost1.dom:80 /path/to/docroot/vhost1
www.vhost2.dom:80 /path/to/docroot/vhost2
:
www.vhostN.dom:80 /path/to/docroot/vhostN
</pre></example>
<example><pre>
##
## httpd.conf
##
:
# ╕«┤┘└╠╖║╞«╟╥╢º ┴ñ▒╘ ╚ú╜║╞«╕φ└╗ ╗τ┐δ╟╤┤┘.
UseCanonicalName on
:
# ░í╗≤╚ú╜║╞«╕ª CLF ╟ⁿ╜─ ╛╒┐í ├▀░í╟╤┤┘
CustomLog /path/to/access_log "%{VHOST}e %h %l %u %t \"%r\" %>s %b"
:
# ┴╓╝¡╣÷┐í╝¡ └τ└█╝║ ┐ú┴°└╗ ╗τ┐δ╟╤┤┘
RewriteEngine on
# ╡╬ ╕╩└╗ ┴ñ└╟╟╤┤┘: ╟╧│¬┤┬ URL└╗ ░φ─í░φ,
# ┤┘╕Ñ ╟╧│¬┤┬ ░í╗≤╚ú╜║╞«║░ DocumentRoot╕ª
# ┴ñ└╟╟╤┤┘.
RewriteMap lowercase int:tolower
RewriteMap vhost txt:/path/to/vhost.map
# └╠┴ª ┼⌐░φ ║╣└Γ╟╤ ▒╘─ó ╟╤░│╕ª ╗τ┐δ╟╧┐⌐
# ░í╗≤╚ú╜║╞«╖╬ ┤δ└└╟╤┤┘.
#
# 1. ░í╗≤╚ú╜║╞«╡Θ└╠ ░░└╠ ╗τ┐δ╟╧┤┬ └º─í┤┬ ┤δ└└╟╧┴÷ ╛╩┤┬┤┘
RewriteCond %{REQUEST_URI} !^/commonurl1/.*
RewriteCond %{REQUEST_URI} !^/commonurl2/.*
:
RewriteCond %{REQUEST_URI} !^/commonurlN/.*
#
# 2. ┐∞╕«░í ╟÷└τ ╗τ┐δ╟╧┤┬ ╣µ╣²└╠ Host ╟∞┤⌡╕ª
# ░í╗≤╚ú╜║╞«╕ª ┴÷┐°╟╧╣╟╖╬
# Host ╟∞┤⌡░í └╓┤┬┴÷ ╚«└╬╟╤┤┘
RewriteCond %{HTTP_HOST} !^$
#
# 3. ╚ú╜║╞«╕φ└╗ ╝╥╣«└┌╖╬ ╕╕╡τ┤┘
RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^(.+)$
#
# 4. vhost.map┐í╝¡ ╚ú╜║╞«╕φ└╗ ├ú░φ
# ░µ╖╬└╧╢º╕╕ ▒Γ╛∩╟╤┤┘
# (└º┐í╝¡ "NONE"└║ ╛╞┤╧┤┘)
RewriteCond ${vhost:%1} ^(/.*)$
#
# 5. ╕╢┴÷╕╖└╕╖╬ URL└╗ ╣«╝¡ └º─í╖╬ ┤δ└└╟╧░φ
# ╖╬▒╫┐í │▓▒Γ▒Γ└º╟╪ ░í╗≤╚ú╜║╞«╕ª ▒Γ╛∩╟╪ ╡╨┤┘
RewriteRule ^/(.*)$ %1/$1 [E=VHOST:${lowercase:%{HTTP_HOST}}]
:
</pre></example>
</dd>
</dl>
</section>
</section>
<section id="access">
<title>┴ó▒┘ ┴ª╟╤</title>
<section>
<title>╖╬║┐ ╕╖▒Γ</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╛ε╢╗░╘ ╟╧╕Θ ╞»┴ñ └Ñ░°░ú└╟ ╞Σ└╠┴÷╕ª ▒▄╛ε╕≡└╕┤┬ ▒═┬·└║
╖╬║┐└╗ ╕╖└╗ ╝÷ └╓│¬? "Robot Exclusion Protocol" ╟╫╕±└╗
└·└σ╟╤ <code>/robots.txt</code> ╞─└╧└║ ║╕┼δ └╠╖▒ ╖╬║┐└╗
╕╖┤┬╡Ñ ├µ║╨╟╧┴÷ ╛╩┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>(╛╞╕╢╡╡ ╡≡╖║┼Σ╕«░í ▒φ╛ε╝¡ ╖╬║┐└╠ ╡╣╛╞┤┘┤╧╕Θ ╝¡╣÷┐í
║╬┤π└╠ ┼½ ░µ┐∞) └Ñ░°░ú <code>/~quux/foo/arc/</code>┐í
└╓┤┬ URL╡Θ└╗ ░┼║╬╟╧┤┬ ▒╘─ó└╗ ╗τ┐δ╟╤┤┘. ┐∞╕«┤┬ ╞»┴ñ
╖╬║┐└╟ ┴ó▒┘└╗ ╕╖╛╞╛▀ ╟╤┤┘. ┴∩, ╖╬║┐└╗ ╜╟╟α╟╧┤┬ ╚ú╜║╞«╕ª
╕╖┤┬ ░═└╕╖╬┤┬ ║╥├µ║╨╟╧╕τ, ▒╫ ╚ú╜║╞«└╟ ╗τ┐δ└┌╡╡ ╕╖╛╞╣÷╕«░╘
╡╚┤┘. User-Agent HTTP ╟∞┤⌡ ┴ñ║╕╡╡ ║±▒│╟╤┤┘.</p>
<example><pre>
RewriteCond %{HTTP_USER_AGENT} ^<strong>NameOfBadRobot</strong>.*
RewriteCond %{REMOTE_ADDR} ^<strong>123\.45\.67\.[8-9]</strong>$
RewriteRule ^<strong>/~quux/foo/arc/</strong>.+ - [<strong>F</strong>]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>▒╫╕▓ ╞█░í▒Γ ╣µ┴÷</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p><code>http://www.quux-corp.de/~quux/</code>┐í └╓┤┬
╞Σ└╠┴÷╡Θ└╠ GIF ▒╫╕▓└╗ ╞≈╟╘╟╤┤┘░φ ░í┴ñ╟╧└┌. └╠ ▒╫╕▓└╠
╕┌└╓╛ε╝¡, ┤┘╕Ñ ╗τ╢≈╡Θ└╠ └┌╜┼└╟ ╞Σ└╠┴÷┐í ┴≈┴ó ╕╡┼⌐╕ª
░╟┤┘. ╝¡╣÷┐í ║╥╟╩┐Σ╟╤ ║╬┤π└╠ ╡╟╣╟╖╬ ╕╖░φ ╜═┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>▒╫╕▓└╗ 100% ║╕╚ú╟╥ ╝÷┤┬ ╛°┴÷╕╕, ├╓╝╥╟╤ ║Ω╢≤┐∞└·░í
HTTP Referer ╟∞┤⌡╕ª ║╕│╗┤┬ ░µ┐∞ ┴ª╟╤╟╥ ╝÷ └╓┤┘.</p>
<example><pre>
RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.*$ [NC]
RewriteRule <strong>.*\.gif$</strong> - [F]
</pre></example>
<example><pre>
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !.*/foo-with-gif\.html$
RewriteRule <strong>^inlined-in-foo\.gif$</strong> - [F]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╚ú╜║╞« ░┼║╬</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╛ε╢╗░╘ ┐▄║╬┐í╝¡ ╝¡╣÷┐í ┴ó▒┘╟╥ ╝÷ ╛°┤┬ ╚ú╜║╞« ╕±╖╧└╗
╝│┴ñ╟╥ ╝÷ └╓│¬?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╛╞╞──í >= 1.3b6┐í╝¡:</p>
<example><pre>
RewriteEngine on
RewriteMap hosts-deny txt:/path/to/hosts.deny
RewriteCond ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
RewriteCond ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND
RewriteRule ^/.* - [F]
</pre></example>
<p>╛╞╞──í <= 1.3b6┐í╝¡:</p>
<example><pre>
RewriteEngine on
RewriteMap hosts-deny txt:/path/to/hosts.deny
RewriteRule ^/(.*)$ ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}/$1
RewriteRule !^NOT-FOUND/.* - [F]
RewriteRule ^NOT-FOUND/(.*)$ ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}/$1
RewriteRule !^NOT-FOUND/.* - [F]
RewriteRule ^NOT-FOUND/(.*)$ /$1
</pre></example>
<example><pre>
##
## hosts.deny
##
## ┴╓└╟! └╠░═└║ ╕±╖╧├│╖│ ║╕└╠┴÷╕╕ ╕±╖╧└╠ ╛╞┤╧╢≤ ╕╩└╠┤┘.
## mod_rewrite┤┬ └╠ ┴ñ║╕╕ª ┼░/░¬ ╜╓└╕╖╬ ╟╪╝«╟╧▒Γ╢º╣«┐í,
## ░ó ╟╫╕±└╟ ░¬ └┌╕«┐í ├╓╝╥╟╤ "-"░í ╟╩┐Σ╟╧┤┘.
##
193.102.180.41 -
bsdti1.sdm.de -
192.76.162.40 -
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╟┴╖╧╜├ ░┼║╬</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>╛ε╢╗░╘ ╞»┴ñ ╚ú╜║╞« ╚ñ└║ ╞»┴ñ ╚ú╜║╞«└╟ ╗τ┐δ└┌░í
╛╞╞──í ╟┴╖╧╜├╕ª ╗τ┐δ╟╥ ╝÷ ╛°╡╡╖╧ ╟╧│¬?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>╕╒└· ╛╞╞──í └Ñ╝¡╣÷╕ª ──╞─└╧╟╥╢º ▒╕╝║╞─└╧┐í╝¡
<module>mod_rewrite</module>░í <module>mod_proxy</module>
╛╞╖í┐í(!) └╓╛ε╛▀ ╟╤┤┘. ▒╫╖»╕Θ <module>mod_rewrite</module>┤┬
<module>mod_proxy</module> <em>└╠└ⁿ┐í</em> ║╥╕░┤┘.
└╠┴ª ┤┘└╜░· ░░└╠ ╞»┴ñ ╚ú╜║╞«╕ª ░┼║╬╟╧╡╡╖╧ ╝│┴ñ╟╤┤┘...</p>
<example><pre>
RewriteCond %{REMOTE_HOST} <strong>^badhost\.mydomain\.com$</strong>
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]
</pre></example>
<p>...▒╫╕«░φ ┤┘└╜└║ user@host┐í ╡√╢≤ ░┼║╬╟╤┤┘:</p>
<example><pre>
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>^badguy@badhost\.mydomain\.com$</strong>
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>╞»║░╟╤ └╬┴⌡ ╣µ╜─</title>
<dl>
<dt>╗≤╚░╝│╕φ:</dt>
<dd>
<p>░í▓√ ╕┼┐∞ ╞»║░╟╤ └╬┴⌡└╠ ╟╩┐Σ╟╥ ╢º░í └╓┤┘. ┐╣╕ª
╡Θ╛ε, ╣╠╕« ╝│┴ñ╟╪╡╨ ╗τ┐δ└┌└╬┴÷ ░╦╗τ╟╤┤┘. └╠╡Θ┐í░╘╕╕
(<module>mod_auth</module>└╟ Basic Auth╕ª ╗τ┐δ╟╤
░µ┐∞┐═ ┤▐╕«) ║░┤┘╕Ñ ╣░└╜╛°└╠ ┴ó▒┘└╗ ╟π┐δ╟╤┤┘.</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>─ú▒╕╕╕ ┴ó▒┘└╠ ░í┤╔╟╧╡╡╖╧ └τ└█╝║ ▒╘─ó╡Θ└╗ ╗τ┐δ╟╤┤┘:</p>
<example><pre>
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>!^friend1@client1.quux-corp\.com$</strong>
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>!^friend2</strong>@client2.quux-corp\.com$
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>!^friend3</strong>@client3.quux-corp\.com$
RewriteRule ^/~quux/only-for-friends/ - [F]
</pre></example>
</dd>
</dl>
</section>
<section>
<title>Referer▒Γ╣▌ ║»╚»▒Γ(deflector)</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>"Referer" HTTP ╟∞┤⌡┐í ╡√╢≤ ┐°╟╧┤┬┤δ╖╬ ┬ⁿ┴╢╞Σ└╠┴÷╕ª
╝│┴ñ╟╥ ╝÷ └╓┤┬ └»┐¼╟╤ URL ║»╚»▒Γ╕ª ╕╕╡Θ ╝÷ └╓┤┬░í?</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>┤┘└╜░· ░░└╠ ║╣└Γ╟╤ ▒╘─ó└╗...</p>
<example><pre>
RewriteMap deflector txt:/path/to/deflector.map
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
RewriteRule ^.* %{HTTP_REFERER} [R,L]
RewriteCond %{HTTP_REFERER} !=""
RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
</pre></example>
<p>... └τ└█╝║ ╕╩░· ░░└╠ ╗τ┐δ╟╤┤┘:</p>
<example><pre>
##
## deflector.map
##
http://www.badguys.com/bad/index.html -
http://www.badguys.com/bad/index2.html -
http://www.badguys.com/bad/index3.html http://somewhere.com/
</pre></example>
<p>▒╫╖»╕Θ ┐Σ├╗└╗ └┌╡┐└╕╖╬ (╕╩┐í╝¡ ░¬└╕╖╬ "<code>-</code>"╕ª
╗τ┐δ╟╤ ░µ┐∞) ┬ⁿ┴╢╞Σ└╠┴÷│¬ (URL└╠ ╕╩┐í └╓┤┬ ░µ┐∞ ╡╬╣°┬░
╛╞▒╘╕╒╞«╖╬) ╞»┴ñ URL╖╬ ╕«┤┘└╠╖║╝╟╟╤┤┘.</p>
</dd>
</dl>
</section>
</section>
<section id="other">
<title>▒Γ┼╕</title>
<section>
<title>┐▄║╬ └τ└█╝║ ┐ú┴°</title>
<dl>
<dt>╗≤╚▓╝│╕φ:</dt>
<dd>
<p>FAQ: ╛ε╢╗░╘ └╠╖▒└·╖▒ └Γ┤┘╟╤ ╣«┴ª╕ª ╟« ╝÷ └╓┤┬░í?
<module>mod_rewrite</module>╖╬┤┬ ╟╪░ß├Ñ└╠ ╛╚║╕└╬┤┘...</p>
</dd>
<dt>╟╪░ß├Ñ:</dt>
<dd>
<p>┐▄║╬ <directive
module="mod_rewrite">RewriteMap</directive>└╗ ╗τ┐δ╟╧╢≤.
┴∩, ╟┴╖╬▒╫╖Ñ└╠ <directive
module="mod_rewrite">RewriteMap</directive> ┐¬╟╥└╗
╟╤┤┘. ╟┴╖╬▒╫╖Ñ└║ ╛╞╞──í░í ╜├└█╟╥╢º ╜├└█╟╧┐⌐
<code>STDIN</code>┐í╝¡ ┐Σ├╗╟╤ URL└╗ ╣▐░φ, (░░└║ ╝°╝¡╖╬!)
░ß░· (║╕┼δ └τ└█╝║╡╚) URL└╗ <code>STDOUT</code>┐í ├Γ╖┬╟╤┤┘.</p>
<example><pre>
RewriteEngine on
RewriteMap quux-map <strong>prg:</strong>/path/to/map.quux.pl
RewriteRule ^/~quux/(.*)$ /~quux/<strong>${quux-map:$1}</strong>
</pre></example>
<example><pre>
#!/path/to/perl
# ╛╞╞──í ╝¡╣÷░í ╕╪├▀┴÷ ╛╩╡╡╖╧
# └╘├Γ╖┬ ╣÷╞█╕ª ╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘
$| = 1;
# stdin┐í╝¡ ╟╤┴┘╛┐ URL└╗ └╨░φ
# stdout┐í ║»╚»╟╤ URL└╗ ├Γ╖┬╟╤┤┘
while (<>) {
s|^foo/|bar/|;
print $_;
}
</pre></example>
<p>╝│╕φ╟╧▒Γ└º╟╪ ╕≡╡τ <code>/~quux/foo/...</code> URL└╗
<code>/~quux/bar/...</code>╖╬ └τ└█╝║╟╧┤┬ ╜║┼⌐╕│╞«╕ª
┐╣╖╬ ╡Θ╛·┤┘. ╜╟┴ª╖╬ ╕╢└╜┤δ╖╬ ╟┴╖╬▒╫╖í╣╓╟╥ ╝÷ └╓┤┘.
▒╫╖»│¬ └╧╣▌ ╗τ┐δ└┌░í └╠╖▒ ╕╩└╗ <strong>╗τ┐δ╟╥</strong>
╝÷ └╓┤┘░φ ╟╧┤⌡╢≤░φ, ┐└┴≈ ╜├╜║┼█ ░ⁿ╕«└┌╕╕└╠ ╕╩└╗
<strong>┴ñ└╟╟╪╛▀</strong> ╟╘└╗ ┴╓└╟╟╧╢≤.</p>
</dd>
</dl>
</section>
</section>
</manualpage>