home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _0E8FFCE2417DEED8B1ACD29FF269700E < prev    next >
Extensible Markup Language  |  2007-09-02  |  66KB  |  2,006 lines

  1. <?xml version="1.0" encoding="EUC-KR"?>
  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="ko" xml:lang="ko"><head><!--
  4.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  5.               This file is generated from xml source: DO NOT EDIT
  6.         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  7.       -->
  8. <title>URL └τ└█╝║ ┴÷─º╝¡ - Apache HTTP Server</title>
  9. <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
  10. <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
  11. <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
  12. <link href="../images/favicon.ico" rel="shortcut icon" /></head>
  13. <body id="manual-page"><div id="page-header">
  14. <p class="menu"><a href="../mod/">╕≡╡Γ</a> | <a href="../mod/directives.html">┴÷╜├╛ε╡Θ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">┐δ╛ε</a> | <a href="../sitemap.html">╗τ└╠╞«╕╩</a></p>
  15. <p class="apache">Apache HTTP Server Version 2.2</p>
  16. <img alt="" src="../images/feather.gif" /></div>
  17. <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
  18. <div id="path">
  19. <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Miscellaneous Documentation</a></div><div id="page-content"><div id="preamble"><h1>URL └τ└█╝║ ┴÷─º╝¡</h1>
  20. <div class="toplang">
  21. <p><span>░í┤╔╟╤ ╛≡╛ε: </span><a href="../en/misc/rewriteguide.html" hreflang="en" rel="alternate" title="English"> en </a> |
  22. <a href="../ko/misc/rewriteguide.html" title="Korean"> ko </a></p>
  23. </div>
  24. <div class="outofdate">└╠ ╣«╝¡┤┬ ├╓╜┼╞╟ ╣°┐¬└╠ ╛╞┤╒┤╧┤┘.
  25.             ├╓▒┘┐í ║»░µ╡╚ │╗┐δ└║ ┐╡╛ε ╣«╝¡╕ª ┬ⁿ░φ╟╧╝╝┐Σ.</div>
  26.  
  27.     <div class="note">
  28.       <p>┐°└·└┌<br />
  29.       <cite>Ralf S. Engelschall <rse@apache.org></cite><br />
  30.       1997│Γ 12┐∙</p>
  31.     </div>
  32.  
  33.     <p>└╠ ╣«╝¡┤┬ <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> <a href="../mod/mod_rewrite.html">┬ⁿ┴╢ ╣«╝¡</a>╕ª ║╕├µ╟╤┤┘.
  34.     └╠ ╣«╝¡┤┬ └Ñ░ⁿ╕«└┌░í ╜╟┴ª └█╛≈┐í╝¡ ║╬╡·─í░╘╡╟┤┬ └ⁿ╟ⁿ└√└╬
  35.     URL░ⁿ╖├ ╣«┴ª╕ª ╟╪░ß╟╧▒Γ└º╟╪╝¡ ╛ε╢╗░╘ ╛╞╞──í
  36.     <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╧┤┬┴÷ ╝│╕φ╟╤┤┘. URL
  37.     └τ└█╝║ ▒╘─ó└╗ ╝│┴ñ╟╧┐⌐ ╣«┴ª╕ª ╟╪░ß╟╧┤┬ ╣µ╣²└╗ └┌╝╝╚≈ ╝│╕φ╟╤┤┘.</p>
  38.  
  39.   </div>
  40. <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#ToC1"><code>mod_rewrite</code> ╝╥░│</a></li>
  41. <li><img alt="" src="../images/down.gif" /> <a href="#ToC2">╜╟┐δ└√└╬ ╟╪░ß├Ñ</a></li>
  42. <li><img alt="" src="../images/down.gif" /> <a href="#url">URL ▒╕┴╢</a></li>
  43. <li><img alt="" src="../images/down.gif" /> <a href="#content">─┴┼┘├≈ ┤┘╖τ▒Γ</a></li>
  44. <li><img alt="" src="../images/down.gif" /> <a href="#access">┴ó▒┘ ┴ª╟╤</a></li>
  45. <li><img alt="" src="../images/down.gif" /> <a href="#other">▒Γ┼╕</a></li>
  46. </ul></div>
  47. <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  48. <div class="section">
  49. <h2><a name="ToC1" id="ToC1"><code>mod_rewrite</code> ╝╥░│</a></h2>
  50.  
  51.     
  52.  
  53.     <p>╛╞╞──í <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> ╕≡╡Γ└║ ▒▓└σ╟╧┤┘.
  54.     ┴∩, URL└╗ ┴╢└█╟╥ ╝÷ └╓┤┬ ░¡╖┬╟╧░φ ╜╟╖╬ ┴ñ▒│╟╤ ╕≡╡Γ└╠┤┘.
  55.     ╗≤╗≤╟╪┐╘┤° ░┼└╟ ╕≡╡τ ┴╛╖∙└╟ URL ┴╢└█└╠ ░í┤╔╟╧┤┘. ▒╫╖»│¬
  56.     ▒╫ ┤δ░í╖╬ ╗τ┐δ╟╧▒Γ ║╣└Γ╟╧┤┘. <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>└╟
  57.     ├╓┤δ ┤▄┴í└║ ├╩║╕└┌░í └╠╟╪╟╧░φ ╗τ┐δ╟╧▒Γ ╜▒┴÷ ╛╩┤┘┤┬ ┴í└╠┤┘.
  58.     ╜╔┴÷╛ε ╛╞╞──í └ⁿ╣«░í╡╡ ┴╛┴╛ <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>└╟
  59.     ╗⌡╖╬┐ε ┐δ╡╡╕ª ╣▀░▀╟╤┤┘.</p>
  60.  
  61.     <p>┤┘╕Ñ ╕╗╖╬: <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>┐í ┤δ╟╪ ┤τ╜┼└║
  62.     ├│└╜┐í ░╠└╗ ╕╘░φ └²┤δ╖╬ ┤┘╜├ ╗τ┐δ╟╧┴÷ ╛╩░┼│¬, ░¡╖┬╟╘┐í ╕┼╖ß╡╟╛ε
  63.     ╛╒└╕╖╬ ╗ε ╡┐╛╚ ╗τ╢√┐í ║ⁿ┴· ░═└╠┤┘. └╠ ▒█└║ ├╣╣°┬░ ░µ┐∞╕ª
  64.     ╕╖▒Γ└º╟╪ └╠╣╠ ╛╦╖┴┴° ╕ε░í┴÷ ╝║░°╗τ╖╩╕ª ╝╥░│╟╧╖┴░φ ╟╤┤┘.</p>
  65.  
  66.   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  67. <div class="section">
  68. <h2><a name="ToC2" id="ToC2">╜╟┐δ└√└╬ ╟╪░ß├Ñ</a></h2>
  69.  
  70.     
  71.  
  72.     <p>└╠┴ª │╗░í ┴≈┴ó ╕╕╡Θ╛·░┼│¬ ┤┘╕Ñ ╗τ╢≈╡Θ└╠ ╕╕╡τ ╕╣└║ ╜╟┐δ└√└╬
  73.     ╟╪░ß├Ñ└╠ │¬┐┬┤┘. ┐╣┴ª┐í╝¡ URL └τ└█╝║└╟ ╚µ╕╢╝·└╗ ╕╢└╜▓» ╣Φ┐∞▒µ
  74.     ╣┘╢⌡┤┘.</p>
  75.  
  76.     <div class="warning">┴╓└╟: ╝¡╣÷ ╝│┴ñ┐í ╡√╢≤ ╗≤╚▓┐í ╕┬░╘
  77.     ┐╣┴ª╕ª ┴╢▒▌ ╝÷┴ñ╟╪╛▀ ╟╥ ░µ┐∞░í └╓┤┘. ┐╣╕ª ╡Θ╛ε, ├▀░í╖╬
  78.     <code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code>, <code class="module"><a href="../mod/mod_userdir.html">mod_userdir</a></code>
  79.     ╡ε└╗ ╗τ┐δ╟╤┤┘╕Θ <code>[PT]</code> ╟├╖í▒╫╕ª ├▀░í╟╤┤┘. ╚ñ└║
  80.     ┴╓╝¡╣÷╝│┴ñ/░í╗≤╚ú╜║╞« ╗τ┐δ└σ╝╥░í ╛╞┤╤ <code>.htaccess</code>
  81.     ╗τ┐δ└σ╝╥┐í ╛╦╕┬░╘ ▒╘─ó└╗ ╝÷┴ñ╟╥ ╝÷╡╡ └╓┤┘. ╗τ┐δ╟╧▒Γ └ⁿ┐í
  82.     ╟╫╗≤ ▒╘─ó└╠ ╛ε╢▓ ▒Γ┤╔└╗ ╟╧┤┬┴÷ └╠╟╪╟╧╡╡╖╧ ╟╪╢≤. ▒╫╖»╕Θ ╣«┴ª╕ª
  83.     ╟╟╟╥ ╝÷ └╓┤┘.</div>
  84.  
  85.   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  86. <div class="section">
  87. <h2><a name="url" id="url">URL ▒╕┴╢</a></h2>
  88.  
  89.     
  90.  
  91.     <h3>▒Γ┴╪└╠ ╡╟┤┬ URL</h3>
  92.  
  93.       
  94.  
  95.       <dl>
  96.         <dt>╗≤╚▓╝│╕φ:</dt>
  97.  
  98.         <dd>
  99.           <p>╟╤ ╕«╝╥╜║┐í ┤δ╟╪ ┐⌐╖» URL└╗ ░í┴÷┤┬ └Ñ╝¡╣÷░í └╓┤┘.
  100.           ║╕┼δ (╜╟┴ª ╗τ┐δ╟╧░φ ╛╦╖┴┴«╛▀ ╟╥) ▒Γ┴╪└╠ ╡╟┤┬ URL░·,
  101.           ┤▄├α ╚ñ└║ │╗║╬ ┐δ╡╡└╟ URL└╠ └╓┤┘. ╗τ┐δ└┌░í ┐Σ├╗┐í
  102.           ╛ε╢▓ URL└╗ ╗τ┐δ╟╧┤°┴÷ ▒Γ┴╪└╠ ╡╟┤┬ URL╕╕└╗ ║╕┐⌐┴α╛▀
  103.           ╟╤┤┘.</p>
  104.         </dd>
  105.  
  106.         <dt>╟╪░ß├Ñ:</dt>
  107.  
  108.         <dd>
  109.           <p>▒Γ┴╪└╠ ╡╟┴÷╛╩┤┬ ╕≡╡τ URL└╗ ║Ω╢≤┐∞└·░í ╛╦╡╡╖╧ ░φ─í▒Γ└º╟╪
  110.           ┐▄║╬ HTTP ╕«┤┘└╠╖║╝╟╟╤┤┘. ┐╣╕ª ╡Θ╛ε ╛╞╖í ▒╘─ó└║
  111.           <code>/~user</code>╕ª ▒Γ┴╪└╠ ╡╟┤┬ <code>/u/user</code>╖╬
  112.           ┤δ├╝╟╧░φ, <code>/u/user</code> ╕╢┴÷╕╖┐í ╜╜╖í╜¼░í ╛°┤┘╕Θ
  113.           ├▀░í╟╤┤┘.</p>
  114.  
  115. <div class="example"><pre>
  116. RewriteRule   ^/<strong>~</strong>([^/]+)/?(.*)    /<strong>u</strong>/$1/$2  [<strong>R</strong>]
  117. RewriteRule   ^/([uge])/(<strong>[^/]+</strong>)$  /$1/$2<strong>/</strong>   [<strong>R</strong>]
  118. </pre></div>
  119.         </dd>
  120.       </dl>
  121.  
  122.     
  123.  
  124.     <h3>▒Γ┴╪└╠ ╡╟┤┬ ╚ú╜║╞«╕φ</h3>
  125.  
  126.       
  127.  
  128.       <dl>
  129.         <dt>╗≤╚▓╝│╕φ:</dt>
  130.  
  131.         <dd>...</dd>
  132.  
  133.         <dt>╟╪░ß├Ñ:</dt>
  134.  
  135.         <dd>
  136. <div class="example"><pre>
  137. RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
  138. RewriteCond %{HTTP_HOST}   !^$
  139. RewriteCond %{SERVER_PORT} !^80$
  140. RewriteRule ^/(.*)         http://fully.qualified.domain.name:%{SERVER_PORT}/$1 [L,R]
  141. RewriteCond %{HTTP_HOST}   !^fully\.qualified\.domain\.name [NC]
  142. RewriteCond %{HTTP_HOST}   !^$
  143. RewriteRule ^/(.*)         http://fully.qualified.domain.name/$1 [L,R]
  144. </pre></div>
  145.         </dd>
  146.       </dl>
  147.  
  148.     
  149.  
  150.     <h3><code>DocumentRoot</code>╕ª ┐┼▒Σ ░µ┐∞</h3>
  151.  
  152.       
  153.  
  154.       <dl>
  155.         <dt>╗≤╚▓╝│╕φ:</dt>
  156.  
  157.         <dd>
  158.           <p>└Ñ╝¡╣÷└╟ <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>┤┬ ║╕┼δ URL
  159.           "<code>/</code>"░· ┴≈┴ó ░ⁿ╖├└╓┤┘. ▒╫╖»│¬ └╠░≈┐í ╕≡╡τ
  160.           └┌╖ß░í └╓┴÷ ╛╩░φ, └┌╖ß░í ┤┘╕Ñ ┐⌐╖» ░≈┐í ╚≡╛ε┴«└╓┤┬
  161.           ░µ┐∞░í └╓┤┘. ┐╣╕ª ╡Θ╛ε └╬╞«╢≤│▌ ╗τ└╠╞«┐í (┐▄║╬╕ª └º╟╤
  162.           ╚¿╞Σ└╠┴÷) <code>/e/www/</code>┐═ (└╬╞«╢≤│▌└╗ └º╟╤
  163.           ╚¿╞Σ└╠┴÷) <code>/e/sww/</code>░í └╓┤┘░φ ╟╧└┌. └╠┴ª
  164.           <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>░í
  165.           <code>/e/www/</code>└╠▒Γ╢º╣«┐í, ┐Σ├╗┐í╝¡ ╞Σ└╠┴÷┐í
  166.           ╞≈╟╘╡╚ ▒╫╕▓ ╡ε└╗ └╠░≈┐í╝¡ ░í┴«┐═╛▀ ╟╤┤┘.</p>
  167.         </dd>
  168.  
  169.         <dt>╟╪░ß├Ñ:</dt>
  170.  
  171.         <dd>
  172.           <p>┐∞╕«┤┬ URL <code>/</code>╕ª <code>/e/www/</code>╖╬
  173.           ╕«┤┘└╠╖║╝╟╕╕ ╟╧╕Θ ╡╚┤┘. ╗τ╝╥╟╪ ║╕└╠┴÷╕╕ ╜╟┴ª╖╬
  174.           <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╪╝¡╕╕ ░í┤╔╟╧┤┘.
  175.           (<code class="module"><a href="../mod/mod_alias.html">mod_alias</a></code> ╡ε└╠ ┴ª░°╟╧┤┬) URL
  176.           <em>Alias</em> ░░└║ └ⁿ╟ⁿ└√└╬ ╣µ╣²└║ <em>╛╒║╬║╨</em>╕╕
  177.           ├ú┤┬┤┘. <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>░í
  178.           ╕≡╡τ URL└╟ ╛╒║╬║╨└╠▒Γ╢º╣«┐í └╠ ╣µ╣²└╗ ╗τ┐δ╟╧┐⌐ ╕«┤┘└╠╖║╝╟└╗
  179.           ╟╥ ╝÷ ╛°┤┘. <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╧╕Θ
  180.           ┴°┬Ñ ░ú┤▄╟╧┤┘:</p>
  181.  
  182. <div class="example"><pre>
  183. RewriteEngine on
  184. RewriteRule   <strong>^/$</strong>  /e/www/  [<strong>R</strong>]
  185. </pre></div>
  186.         </dd>
  187.       </dl>
  188.  
  189.     
  190.  
  191.     <h3>╕╢┴÷╕╖ ╜╜╖í╜¼ ╣«┴ª</h3>
  192.  
  193.       
  194.  
  195.       <dl>
  196.         <dt>╗≤╚▓╝│╕φ:</dt>
  197.  
  198.         <dd>
  199.           <p>╡≡╖║┼Σ╕«╕ª ┴÷─¬╟╧┤┬ URL└╟ ╕╢┴÷╕╖ ╜╜╖í╜¼ ╣«┴ª░í
  200.           ╛°┤┘╕Θ ╕≡╡τ └Ñ░ⁿ╕«└┌┤┬ ╚»╚ú╟╥ ░═└╠┤┘. ╜╜╖í╜¼░í ╛°┤┘╕Θ,
  201.           ┴∩ <code>/~quux/foo/</code> ┤δ╜┼ <code>/~quux/foo</code>╕ª
  202.           ╗τ┐δ╟╧╕Θ ╝¡╣÷░í <code>foo</code>╢≤┤┬ <em>╞─└╧</em>└╗
  203.           ├ú▒Γ╢º╣«┐í ┐└╖∙░í ╣▀╗²╟╤┤┘. ╞─└╧└╠ ╡≡╖║┼Σ╕«└╠▒Γ╢º╣«┐í
  204.           ╣▐╛╞╡Θ└╠┴÷ ╛╩┤┬┤┘. ┤δ║╬║╨└╟ ░µ┐∞ ║╕┼δ ╝¡╣÷░í └┌╡┐└╕╖╬
  205.           URL└╗ ░φ─í┴÷╕╕, ░í▓√ ┴≈┴ó ╟╪┴α╛▀ ╟╥ ░µ┐∞░í └╓┤┘. ┐╣╕ª
  206.           ╡Θ╛ε, CGI ╜║┼⌐╕│╞« ╡ε└╕╖╬ ║╣└Γ╟╤ URL └τ└█╝║└╗ ╟╤ ╚─┐í
  207.           ▒╫╖»╟╧┤┘.</p>
  208.         </dd>
  209.  
  210.         <dt>╟╪░ß├Ñ:</dt>
  211.  
  212.         <dd>
  213.           <p>└╠ ╣╠╣ª╟╤ ╣«┴ª└╟ ╟╪░ß╣µ╣²└║ ╝¡╣÷░í └┌╡┐└╕╖╬ ╕╢┴÷╕╖
  214.           ╜╜╖í╜¼╕ª ├▀░í╟╧┤┬ ░═└╠┤┘. ║Ω╢≤┐∞└·░í │¬╕╙┴÷ ▒╫╕▓ ╡ε└╗
  215.           ┐├╣┘╖╬ ┐Σ├╗╟╥ ╝÷ └╓╡╡╖╧, ┐▄║╬ ╕«┤┘└╠╖║╝╟└╗ ╟╪╛▀ ╟╤┤┘.
  216.           │╗║╬ ╕«┤┘└╠╖║╝╟└╗ ╟╤┤┘╕Θ ╡≡╖║┼Σ╕« ╞Σ└╠┴÷┐í╕╕ ╡┐└█╟╧┐⌐
  217.           └╠ ╞Σ└╠┴÷░í ╗≤┤δ URL╖╬ ╞≈╟╘╟╧┤┬ ▒╫╕▓└╗ ║Ω╢≤┐∞└·░í
  218.           ┐Σ├╗╟╥╢º ├ú└╗ ╝÷ ╛°┤┘. ┐╣╕ª ╡Θ╛ε, ┐▄║╬ ╕«┤┘└╠╖║╝╟└╗
  219.           ╗τ┐δ╟╧┴÷ ╛╩└╗╢º <code>/~quux/foo/index.html</code>┐í╝¡
  220.           <code>image.gif</code>╕ª ┐Σ├╗╟╧╕Θ
  221.           <code>/~quux/image.gif</code>╕ª ┐Σ├╗╟╧░╘ ╡╚┤┘!</p>
  222.  
  223.           <p>▒╫╖í╝¡ └╠╕ª ╟╪░ß╟╧▒Γ└º╟╪ ┤┘└╜░· ░░└╠ ╝│┴ñ╟╤┤┘:</p>
  224.  
  225. <div class="example"><pre>
  226. RewriteEngine  on
  227. RewriteBase    /~quux/
  228. RewriteRule    ^foo<strong>$</strong>  foo<strong>/</strong>  [<strong>R</strong>]
  229. </pre></div>
  230.  
  231.           <p>╚¿╡≡╖║┼Σ╕«└╟ ├╓╗≤└º <code>.htaccess</code> ╞─└╧┐í
  232.           ┤┘└╜░· ░░└╠ ╝│┴ñ╟╥ ╝÷╡╡ └╓┤┘. ▒╫╖»│¬ ├│╕«╟╧┤┬╡Ñ ║╬┤π└╠
  233.           ╡╚┤┘.</p>
  234.  
  235. <div class="example"><pre>
  236. RewriteEngine  on
  237. RewriteBase    /~quux/
  238. RewriteCond    %{REQUEST_FILENAME}  <strong>-d</strong>
  239. RewriteRule    ^(.+<strong>[^/]</strong>)$           $1<strong>/</strong>  [R]
  240. </pre></div>
  241.         </dd>
  242.       </dl>
  243.  
  244.     
  245.  
  246.     <h3>└╧░ⁿ╡╚ URL ▒╕┴╢╖╬ ╕╕╡τ └Ñ┼¼╖»╜║┼═</h3>
  247.  
  248.       
  249.  
  250.       <dl>
  251.         <dt>╗≤╚▓╝│╕φ:</dt>
  252.  
  253.         <dd>
  254.           <p>└╬╞«╢≤│▌ └Ñ╝¡╣÷▒║└╟ ╕≡╡τ └Ñ╝¡╣÷┐í ╡┐└╧╟╧░φ └╧░ⁿ╡╚
  255.           URL ▒╕┴╢╕ª ╕╕╡Θ░φ ╜═┤┘. ┴∩, ╕≡╡τ (┴ñ└╟╗≤ ╝¡╣÷┐í ╝╙╟╧┐⌐
  256.           ╝¡╣÷┐í └╟┴╕└√└╬!) URL└╗ ╝¡╣÷ <em>╡╢╕│└√└╕╖╬</em> ╕╕╡τ┤┘!
  257.           └Ñ └╠╕º░°░ú┐í ╝¡╣÷╡╢╕│└√└╬ ╡┐└╧╟╤ ▒╕┴╢╕ª ║╬┐⌐╟╪╛▀ ╟╤┤┘:
  258.           URL└║ ╜╟┴ª ╝¡╣÷╕ª ┴÷─¬╟╧╕Θ ╛╚╡╚┤┘. ╝¡╣÷▒║└╠ └┌╡┐└╕╖╬
  259.           ╜╟┴ª ╝¡╣÷╖╬ └»╡╡╟╤┤┘.</p>
  260.         </dd>
  261.  
  262.         <dt>╟╪░ß├Ñ:</dt>
  263.  
  264.         <dd>
  265.           <p>╕╒└· ╗τ┐δ└┌, ▒╫╖∞, ╡╢╕│├╝└╟ └º─í ┴ñ║╕╕ª └·└σ╟╤
  266.           (║╨╗Ω╡╚) ┐▄║╬╕╩┐í ╜╟┴ª ╝¡╣÷ ┴ñ║╕╕ª ╛≥╛ε┐┬┤┘. ┐▄║╬╕╩└║
  267.           ┤┘└╜░· ░░└║ ╟ⁿ╜─└╠┤┘</p>
  268.  
  269. <div class="example"><pre>
  270. user1  server_of_user1
  271. user2  server_of_user2
  272. :      :
  273. </pre></div>
  274.  
  275.           <p>┐∞╕«┤┬ └╠ ┴ñ║╕╕ª ░ó░ó <code>map.xxx-to-host</code>
  276.           ╞─└╧┐í └·└σ╟▀┤┘. ┤┘└╜└╕╖╬ ╕≡╡τ ╝¡╣÷┐í╝¡ URL└╠ ╝¡╣÷┐í
  277.           ╛°┤┘╕Θ ┤┘└╜░· ░░└║ URL└╗,</p>
  278.  
  279. <div class="example"><pre>
  280. /u/user/anypath
  281. /g/group/anypath
  282. /e/entity/anypath
  283. </pre></div>
  284.  
  285.           <p>┤┘└╜░· ░░└╠ ╕«┤┘└╠╖║╝╟╟╤┤┘</p>
  286.  
  287. <div class="example"><pre>
  288. http://physical-host/u/user/anypath
  289. http://physical-host/g/group/anypath
  290. http://physical-host/e/entity/anypath
  291. </pre></div>
  292.  
  293.           <p>╛╞╖í ▒╘─ó└║ ╕╩╞─└╧└╗ ╗τ┐δ╟╧┐⌐ └╠ └█╛≈└╗ ╟╤┤┘ (server0└║
  294.           ╕╩┐í ╟╫╕±└╠ ╛°┤┬ ░µ┐∞ ╗τ┐δ╟╥ ▒Γ║╗╝¡╣÷╢≤░φ ░í┴ñ╟╤┤┘):</p>
  295.  
  296. <div class="example"><pre>
  297. RewriteEngine on
  298.  
  299. RewriteMap      user-to-host   txt:/path/to/map.user-to-host
  300. RewriteMap     group-to-host   txt:/path/to/map.group-to-host
  301. RewriteMap    entity-to-host   txt:/path/to/map.entity-to-host
  302.  
  303. RewriteRule   ^/u/<strong>([^/]+)</strong>/?(.*)   http://<strong>${user-to-host:$1|server0}</strong>/u/$1/$2
  304. RewriteRule   ^/g/<strong>([^/]+)</strong>/?(.*)  http://<strong>${group-to-host:$1|server0}</strong>/g/$1/$2
  305. RewriteRule   ^/e/<strong>([^/]+)</strong>/?(.*) http://<strong>${entity-to-host:$1|server0}</strong>/e/$1/$2
  306.  
  307. RewriteRule   ^/([uge])/([^/]+)/?$          /$1/$2/.www/
  308. RewriteRule   ^/([uge])/([^/]+)/([^.]+.+)   /$1/$2/.www/$3\
  309. </pre></div>
  310.         </dd>
  311.       </dl>
  312.  
  313.     
  314.  
  315.     <h3>╚¿╡≡╖║┼Σ╕«╕ª ┤┘╕Ñ └Ñ╝¡╣÷╖╬ └╠└ⁿ</h3>
  316.  
  317.       
  318.  
  319.       <dl>
  320.         <dt>╗≤╚▓╝│╕φ:</dt>
  321.  
  322.         <dd>
  323.           <p>╕╣└║ └Ñ░ⁿ╕«└┌┤┬ └Ñ╝¡╣÷└╟ ╕≡╡τ ╚¿╡≡╖║┼Σ╕«╕ª ┤┘╕Ñ
  324.           └Ñ╝¡╣÷╖╬ └╠└ⁿ╟╤ ░µ┐∞ ╟╪░ß├Ñ└╗ ╣░╛ε║╗┤┘. └╠ ╣µ╣²└║
  325.           └╠└ⁿ ╝¡╣÷╕ª ┤δ├╝╟╥ ╗⌡╖╬┐ε ╝¡╣÷╕ª ▒╕╝║╟╧┤┬╡Ñ ╜├░ú└╠
  326.           ░╔╕«┤┬ ░µ┐∞┐í ╟╩┐Σ╟╧┤┘.</p>
  327.         </dd>
  328.  
  329.         <dt>╟╪░ß├Ñ:</dt>
  330.  
  331.         <dd>
  332.           <p><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╧╕Θ ░ú┤▄╟╧┤┘.
  333.           └╠└ⁿ └Ñ╝¡╣÷┤┬ ╕≡╡τ <code>/~user/anypath</code> URL└╗
  334.           <code>http://newserver/~user/anypath</code>╖╬
  335.           ╕«┤┘└╠╖║╝╟╟╧╕Θ ╡╚┤┘.</p>
  336.  
  337. <div class="example"><pre>
  338. RewriteEngine on
  339. RewriteRule   ^/~(.+)  http://<strong>newserver</strong>/~$1  [R,L]
  340. </pre></div>
  341.         </dd>
  342.       </dl>
  343.  
  344.     
  345.  
  346.     <h3>╚¿╡≡╖║┼Σ╕« ▒╕┴╢ ╕╕╡Θ▒Γ</h3>
  347.  
  348.       
  349.  
  350.       <dl>
  351.         <dt>╗≤╚▓╝│╕φ:</dt>
  352.  
  353.         <dd>
  354.           <p>╗τ┐δ└┌░í ╝÷├╡╕φ└╬ ╗τ└╠╞«┤┬ ║╕┼δ ╚¿╡≡╖║┼Σ╕« ▒╕┴╢╕ª
  355.           ╕╕╡τ┤┘. ┴∩, ┐╣╕ª ╡Θ╛ε └╠╕º└╠ ╗τ┐δ└┌╕φ└╟ ├╣╣°┬░ ╣«└┌└╬
  356.           ╟╧└º╡≡╖║┼Σ╕«┐í ╚¿╡≡╖║┼Σ╕«╕ª ╡╨┤┘. ▒╫╖í╝¡,
  357.           <code>/~foo/anypath</code>┤┬
  358.           <code>/home/<strong>f</strong>/foo/.www/anypath</code>└╠░φ,
  359.           <code>/~bar/anypath</code>┤┬
  360.           <code>/home/<strong>b</strong>/bar/.www/anypath</code>└╠┤┘.</p>
  361.         </dd>
  362.  
  363.         <dt>╟╪░ß├Ñ:</dt>
  364.  
  365.         <dd>
  366.           <p>╣░░ß╟Ñ╜├░í └╓┤┬ URL└╗ └º┐═ ░░└║ ▒╕┴╢╖╬ ║»╚»╟╧▒Γ└º╟╪
  367.           ┤┘└╜ ▒╘─ó└╗ ╗τ┐δ╟╤┤┘.</p>
  368.  
  369. <div class="example"><pre>
  370. RewriteEngine on
  371. RewriteRule   ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*)  /home/<strong>$2</strong>/$1/.www$3
  372. </pre></div>
  373.         </dd>
  374.       </dl>
  375.  
  376.     
  377.  
  378.     <h3>╞─└╧╜├╜║┼█ └τ▒╕╝║</h3>
  379.  
  380.       
  381.  
  382.       <dl>
  383.         <dt>╗≤╚▓╝│╕φ:</dt>
  384.  
  385.         <dd>
  386.           <p>└╠ ┐╣┤┬ ╜╟╖╬ ╟╧╡σ─┌╛ε└√└╠┤┘: ╡≡╖║┼Σ╕«║░
  387.           <code>RewriteRules</code>╕ª ╕┼┐∞ ╕╣└╠ ╗τ┐δ╟╧┐⌐ └┌╖ß
  388.           └┌├╝┤┬ ▒╫┤δ╖╬ ╡╨├╝╖╬ └Ñ┐í └┌╖ß╕ª └┌┐¼╜║╖┤░╘ ║Ω╢≤┐∞┬í╟╧╡╡╖╧
  389.           ╟╤┤┘. ╣Φ░µ: │¬┤┬ 1992│Γ ║╬┼═ └┌└»╖╙░╘ ╗τ┐δ╟╥ ╝÷ └╓┤┬
  390.           └»┤╨╜║ ╝╥╟┴╞«┐■╛ε╡Θ└╗ <strong><em>net.sw</em></strong>┐í
  391.           ╕≡╛╞╡╬░φ └╓╛·┤┘. └╠┤┬ │╗░í ──╟╗┼═░·╟╨└╗ ░°║╬╟╧╕Θ╝¡
  392.           ┐⌐╖»╟╪╡┐╛╚ ┐⌐░í╜├░ú┐í ╜├╜║┼█ ░ⁿ╕«└┌┐═ │╫╞«┐≈ ░ⁿ╕«└┌╕ª
  393.           ╟╪┐╘▒Γ╢º╣«┐í │╗ ├δ╣╠└╠└┌ └╧└╠┤┘. ╕┼┴╓╕╢┤┘ ╗⌡╖╬ ╝╥╟┴╞«┐■╛ε░í
  394.           ├▀░í╡╔ ╢º╕╢┤┘ ╡≡╖║┼Σ╕«╕ª ▒φ░╘ ╕╕╡Θ╛ε┐╘┤┘:</p>
  395.  
  396. <div class="example"><pre>
  397. drwxrwxr-x   2 netsw  users    512 Aug  3 18:39 Audio/
  398. drwxrwxr-x   2 netsw  users    512 Jul  9 14:37 Benchmark/
  399. drwxrwxr-x  12 netsw  users    512 Jul  9 00:34 Crypto/
  400. drwxrwxr-x   5 netsw  users    512 Jul  9 00:41 Database/
  401. drwxrwxr-x   4 netsw  users    512 Jul 30 19:25 Dicts/
  402. drwxrwxr-x  10 netsw  users    512 Jul  9 01:54 Graphic/
  403. drwxrwxr-x   5 netsw  users    512 Jul  9 01:58 Hackers/
  404. drwxrwxr-x   8 netsw  users    512 Jul  9 03:19 InfoSys/
  405. drwxrwxr-x   3 netsw  users    512 Jul  9 03:21 Math/
  406. drwxrwxr-x   3 netsw  users    512 Jul  9 03:24 Misc/
  407. drwxrwxr-x   9 netsw  users    512 Aug  1 16:33 Network/
  408. drwxrwxr-x   2 netsw  users    512 Jul  9 05:53 Office/
  409. drwxrwxr-x   7 netsw  users    512 Jul  9 09:24 SoftEng/
  410. drwxrwxr-x   7 netsw  users    512 Jul  9 12:17 System/
  411. drwxrwxr-x  12 netsw  users    512 Aug  3 20:15 Typesetting/
  412. drwxrwxr-x  10 netsw  users    512 Jul  9 14:08 X11/
  413. </pre></div>
  414.  
  415.           <p>1996│Γ 7┐∙ └╠ └·└σ╝╥╕ª ╕┌└╓┤┬ └Ñ └╬┼═╞Σ└╠╜║╕ª ┼δ╟╪
  416.           ╝╝╗≤┐í ░°░│╟╧▒Γ╖╬ ░ß┴ñ╟▐┤┘. "╕┌└╓┤┘"┤┬ ╕╗└║, ├╓╗≤└º
  417.           ╡≡╖║┼Σ╕«┐í CGI ╜║┼⌐╕│╞«╕ª ╡╬┴÷ ╛╩░φ╡╡, └·└σ╝╥ ░Φ├■▒╕┴╢╕ª
  418.           ┴≈┴ó ║Ω╢≤┐∞┴·╟╧▒µ ╣┘╢⌡┤┘┤┬ ╢µ└╠┤┘. ┐╓? └·└σ╝╥╕ª │¬┴▀┐í
  419.           FTP╖╬╡╡ ┴ó▒┘╟╥ ╝÷ └╓╡╡╖╧ ╕╕╡Θ ┐╣┴ñ└╠┐┤▒Γ╢º╣«┐í └Ñ└╠│¬
  420.           CGI┐═ ░ⁿ╖├╡╚ │╗┐δ└╗ ░░└╠ ╡╬▒Γ ╜╚╛·┤┘.</p>
  421.         </dd>
  422.  
  423.         <dt>╟╪░ß├Ñ:</dt>
  424.  
  425.         <dd>
  426.           <p>╟╪░ß├Ñ└║ ╡╬ ║╬║╨└╕╖╬ │¬┤╢┤┘: ╕╒└· ╡≡╖║┼Σ╕« ╝÷┴╪┐í╝¡
  427.           ╟╩┐Σ╟╤ ╕≡╡τ ╞Σ└╠┴÷╕ª ╡┐└√└╕╖╬ ╕╕╡σ┤┬ CGI ╜║┼⌐╕│╞«░í
  428.           ╟╩┐Σ╟╧┤┘. │¬┤┬ └╠ ╜║┼⌐╕│╞«╡Θ└╗ ┤┘└╜░· ░░└╠
  429.           <code>/e/netsw/.www/</code>┐í ╡╬╛·┤┘:</p>
  430.  
  431. <div class="example"><pre>
  432. -rw-r--r--   1 netsw  users    1318 Aug  1 18:10 .wwwacl
  433. drwxr-xr-x  18 netsw  users     512 Aug  5 15:51 DATA/
  434. -rw-rw-rw-   1 netsw  users  372982 Aug  5 16:35 LOGFILE
  435. -rw-r--r--   1 netsw  users     659 Aug  4 09:27 TODO
  436. -rw-r--r--   1 netsw  users    5697 Aug  1 18:01 netsw-about.html
  437. -rwxr-xr-x   1 netsw  users     579 Aug  2 10:33 netsw-access.pl
  438. -rwxr-xr-x   1 netsw  users    1532 Aug  1 17:35 netsw-changes.cgi
  439. -rwxr-xr-x   1 netsw  users    2866 Aug  5 14:49 netsw-home.cgi
  440. drwxr-xr-x   2 netsw  users     512 Jul  8 23:47 netsw-img/
  441. -rwxr-xr-x   1 netsw  users   24050 Aug  5 15:49 netsw-lsdir.cgi
  442. -rwxr-xr-x   1 netsw  users    1589 Aug  3 18:43 netsw-search.cgi
  443. -rwxr-xr-x   1 netsw  users    1885 Aug  1 17:41 netsw-tree.cgi
  444. -rw-r--r--   1 netsw  users     234 Jul 30 16:35 netsw-unlimit.lst
  445. </pre></div>
  446.  
  447.           <p><code>DATA/</code> ╟╧└º╡≡╖║┼Σ╕«┐í └º┐í╝¡ ╕╗╟╤ └·└σ╝╥░í
  448.           └╓┤┘. ╜╟┴ª <strong><em>net.sw</em></strong>└╟ │╗┐δ└║ ║╕┼δ
  449.           <code>rdist</code>╕ª ╗τ┐δ╟╧┐⌐ └┌╡┐└╕╖╬ ░í┴«┐┬┤┘. ╡╬╣°┬░
  450.           ║╬║╨└╠ │▓╛╥┤┘: ╛ε╢╗░╘ └╠ ╡╬ ▒╕┴╢╕ª ╟╧│¬└╟ └┌┐¼╜║╖»┐ε
  451.           URL ▒╕┴╢╖╬ ┐¼░ß╟╧┤┬░í? ╗τ┐δ└┌┐í░╘ <code>DATA/</code>
  452.           ╡≡╖║┼Σ╕«╕ª ░¿├▀░φ, URL╕╢┤┘ └√└²╟╤ CGI ╜║┼⌐╕│╞«╕ª ╜╟╟α╟╧░φ
  453.           ╜═┤┘. ╟╪░ß├Ñ└║ ┤┘└╜░· ░░┤┘: ╕╒└· ╝¡╣÷└╟ <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code>┐í╝¡ ░°░│╡╚
  454.           URL <code>/net.sw/</code>╕ª │╗║╬ ░µ╖╬ <code>/e/netsw</code>╖╬
  455.           └τ└█╝║╟╧▒Γ└º╟╪ ╡≡╖║┼Σ╕«║░ ╝│┴ñ╞─└╧┐í ┤┘└╜░· ░░└╠ ╝│┴ñ╟╤┤┘:</p>
  456.  
  457. <div class="example"><pre>
  458. RewriteRule  ^net.sw$       net.sw/        [R]
  459. RewriteRule  ^net.sw/(.*)$  e/netsw/$1
  460. </pre></div>
  461.  
  462.           <p>├╣╣°┬░ ▒╘─ó└║ ╕╢┴÷╕╖┐í ╜╜╖í╜¼░í ╛°┤┬ ┐Σ├╗└╗ └º╟╪╝¡
  463.           ╗τ┐δ╟▀┤┘! ╡╬╣°┬░ ▒╘─ó└╠ ╜╟┴ª └█╛≈└╗ ╟╤┤┘. ▒╫╕«░φ ╡≡╖║┼Σ╕«║░
  464.           ╝│┴ñ╞─└╧ <code>/e/netsw/.www/.wwwacl</code>┐í ░ß┴ñ└√└╬
  465.           ╝│┴ñ└╠ │¬┐┬┤┘:</p>
  466.  
  467. <div class="example"><pre>
  468. Options       ExecCGI FollowSymLinks Includes MultiViews
  469.  
  470. RewriteEngine on
  471.  
  472. #  ╛╒ ║╬║╨└╠ /net.sw/ ╖╬ ┴ó▒┘╟╤┤┘
  473. RewriteBase   /net.sw/
  474.  
  475. #  ╕╒└· ├╓╗≤└º ╡≡╖║┼Σ╕«╕ª
  476. #  cgi ╜║┼⌐╕│╞«╖╬ └τ└█╝║╟╤┤┘
  477. RewriteRule   ^$                       netsw-home.cgi     [L]
  478. RewriteRule   ^index\.html$            netsw-home.cgi     [L]
  479.  
  480. #  ║Ω╢≤┐∞└·░í ╡≡╖║┼Σ╕«║░ ╞Σ└╠┴÷╕ª ┐Σ├╗╟╤ ░µ┐∞
  481. #  ╟╧└º╡≡╖║┼Σ╕«╕ª ├▀├Γ╟╤┤┘
  482. RewriteRule   ^.+/(netsw-[^/]+/.+)$    $1                 [L]
  483.  
  484. #  └╠┴ª └τ└█╝║└╗ ╕╢─ú┤┘
  485. RewriteRule   ^netsw-home\.cgi.*       -                  [L]
  486. RewriteRule   ^netsw-changes\.cgi.*    -                  [L]
  487. RewriteRule   ^netsw-search\.cgi.*     -                  [L]
  488. RewriteRule   ^netsw-tree\.cgi$        -                  [L]
  489. RewriteRule   ^netsw-about\.html$      -                  [L]
  490. RewriteRule   ^netsw-img/.*$           -                  [L]
  491.  
  492. #  ┤┘╕Ñ cgi ╜║┼⌐╕│╞«░í ├│╕«╟╥
  493. #  ╟╧└º╡≡╖║┼Σ╕«░í │▓╛╥┤┘
  494. RewriteRule   !^netsw-lsdir\.cgi.*     -                  [C]
  495. RewriteRule   (.*)                     netsw-lsdir.cgi/$1
  496. </pre></div>
  497.  
  498.           <p>╟╪╝«└╗ └º╟╤ ╚∙╞«:</p>
  499.  
  500.           <ol>
  501.             <li>│╫╣°┬░ ║╬║╨┐í╝¡ ┤δ├╝ ╟╩╡σ('<code>-</code>')░í
  502.             ╛°░φ <code>L</code> (last) ╟├╖í▒╫░í └╓└╜└╗ ┴╓╕±╟╧╢≤</li>
  503.  
  504.             <li>╕╢┴÷╕╖ ║╬║╨┐í╝¡ ├╣╣°┬░ ▒╘─ó┐í <code>!</code>
  505.             (not) ╣«└┌┐═ <code>C</code> (chain) ╟├╖í▒╫╕ª ┴╓╕±╟╧╢≤</li>
  506.  
  507.             <li>╕╢┴÷╕╖ ▒╘─ó┐í╝¡ ▒Γ┼╕ ╟╪┤τ╟╧┴÷ ╛╩┤┬ ╕≡╡τ ░µ┐∞╕ª
  508.             └Γ╛╞│╗┤┬ ╞╨┼╧└╗ ┴╓╕±╟╧╢≤</li>
  509.           </ol>
  510.         </dd>
  511.       </dl>
  512.  
  513.     
  514.  
  515.     <h3>NCSA imagemap└╗ ╛╞╞──í <code>mod_imagemap</code>└╕╖╬</h3>
  516.  
  517.       
  518.  
  519.       <dl>
  520.         <dt>╗≤╚▓╝│╕φ:</dt>
  521.  
  522.         <dd>
  523.           <p>╗τ╢≈╡Θ└║ NCSA └Ñ╝¡╣÷┐í╝¡ ╟÷┤δ└√└╬ ╛╞╞──í └Ñ╝¡╣÷╖╬
  524.           └┌┐¼╜║╖┤░╘ ┐┼░▄░í▒µ ╣┘╢⌡┤┘. ▒╫╖í╝¡ ┐└╖í╡╚ NCSA
  525.           <code>imagemap</code> ╟┴╖╬▒╫╖Ñ└╗ ╗τ┐δ╟╤ ╞Σ└╠┴÷╕ª ╟÷┤δ└√└╬
  526.           ╛╞╞──í <code class="module"><a href="../mod/mod_imagemap.html">mod_imagemap</a></code>╖╬ ├│╕«╟╧▒µ ╣┘╢⌡┤┘.
  527.           ╣«┴ª┤┬ <code>imagemap</code> ╟┴╖╬▒╫╖Ñ└╗
  528.           <code>/cgi-bin/imagemap/path/to/page.map</code>░·
  529.           ░░└╠ ┬ⁿ┴╢╟╧┤┬ ╟╧└╠╞█╕╡┼⌐░í ╕╣┤┘┤┬ ░═└╠┤┘. ╛╞╞──í┤┬
  530.           <code>/path/to/page.map</code>░· ░░└║ ┐Σ├╗└╗ ╣▐╛╞╛▀
  531.           ╟╤┤┘.</p>
  532.         </dd>
  533.  
  534.         <dt>╟╪░ß├Ñ:</dt>
  535.  
  536.         <dd>
  537.           <p>╕≡╡τ ┐Σ├╗┐í╝¡ ╛╒║╬║╨└╗ ╡┐└√└╕╖╬ ┴ª░┼╟╧┤┬ └ⁿ┐¬ ▒╘─ó└╗
  538.           ╗τ┐δ╟╤┤┘:</p>
  539.  
  540. <div class="example"><pre>
  541. RewriteEngine  on
  542. RewriteRule    ^/cgi-bin/imagemap(.*)  $1  [PT]
  543. </pre></div>
  544.         </dd>
  545.       </dl>
  546.  
  547.     
  548.  
  549.     <h3>┐⌐╖» ╡≡╖║┼Σ╕«┐í╝¡ ╞Σ└╠┴÷ ░╦╗÷</h3>
  550.  
  551.       
  552.  
  553.       <dl>
  554.         <dt>╗≤╚▓╝│╕φ:</dt>
  555.  
  556.         <dd>
  557.           <p>░í▓√ └Ñ╝¡╣÷░í ┐⌐╖» ╡≡╖║┼Σ╕«┐í╝¡ ╞─└╧└╗ ├ú╛╞╛▀ ╟╥
  558.           ╢º░í └╓┤┘. └╠ ░µ┐∞ MultiViews│¬ ┤┘╕Ñ ╣µ╣²└║ ╡╡┐≥└╠
  559.           ╛╚╡╚┤┘.</p>
  560.         </dd>
  561.  
  562.         <dt>╟╪░ß├Ñ:</dt>
  563.  
  564.         <dd>
  565.           <p>┐⌐╖» ╡≡╖║┼Σ╕«┐í╝¡ ╞─└╧└╗ ├ú┤┬ ▒╘─ó└╗ ┴≈┴ó ╟┴╖╬▒╫╖Ñ╟╤┤┘.</p>
  566.  
  567. <div class="example"><pre>
  568. RewriteEngine on
  569.  
  570. #   ╕╒└· custom/┐í╝¡ ├ú▒µ ╜├╡╡╟╧░φ...
  571. #   ...├ú└╕╕Θ │í!
  572. RewriteCond         /your/docroot/<strong>dir1</strong>/%{REQUEST_FILENAME}  -f
  573. RewriteRule  ^(.+)  /your/docroot/<strong>dir1</strong>/$1  [L]
  574.  
  575. #   ╡╬╣°┬░╖╬ pub/┐í╝¡ ├ú▒µ ╜├╡╡╟╤┤┘...
  576. #   ...├ú└╕╕Θ │í!
  577. RewriteCond         /your/docroot/<strong>dir2</strong>/%{REQUEST_FILENAME}  -f
  578. RewriteRule  ^(.+)  /your/docroot/<strong>dir2</strong>/$1  [L]
  579.  
  580. #   ╕°├ú└╕╕Θ ┤┘╕Ñ Alias│¬ ScriptAlias ┴÷╜├╛ε ╡ε└╕╖╬ ┴°╟α╟╤┤┘.
  581. RewriteRule   ^(.+)  -  [PT]
  582. </pre></div>
  583.         </dd>
  584.       </dl>
  585.  
  586.     
  587.  
  588.     <h3>URL┐í ╡√╢≤ ╚»░µ║»╝÷╕ª ╝│┴ñ╟╤┤┘</h3>
  589.  
  590.       
  591.  
  592.       <dl>
  593.         <dt>╗≤╚▓╝│╕φ:</dt>
  594.  
  595.         <dd>
  596.           <p>┐Σ├╗╡Θ░ú┐í ╗≤┼┬┴ñ║╕╕ª └»┴÷╟╧▒Γ└º╟╪ URL┐í ┴ñ║╕╕ª
  597.           └╬─┌╡∙╟╧┤┬ ╣µ╣²╡╡ └╓┤┘. ▒╫╖»│¬ ┤▄┴÷ └╠ ┴ñ║╕╕ª ┴ª░┼╟╧▒Γ└º╟╪
  598.           ╕≡╡τ ╞Σ└╠┴÷┐í CGI wrapper╕ª ╗τ┐δ╟╧░φ ╜═┴÷ ╛╩┤┘.</p>
  599.         </dd>
  600.  
  601.         <dt>╟╪░ß├Ñ:</dt>
  602.  
  603.         <dd>
  604.           <p>└τ└█╝║ ▒╘─ó└╗ ╗τ┐δ╟╧┐⌐ ╗≤┼┬┴ñ║╕╕ª ├▀├Γ╟╧░φ, ├▀├Γ╟╤
  605.           ┴ñ║╕╕ª │¬┴▀┐í XSSI│¬ CGI┐í╝¡ ╗τ┐δ╟╧▒Γ└º╟╪ ╚»░µ║»╝÷┐í
  606.           └·└σ╟╤┤┘. ▒╫╖í╝¡ URL <code>/foo/S=java/bar/</code>┤┬
  607.           <code>/foo/bar/</code>╖╬ ║»╚»╡╟░φ <code>STATUS</code>╢≤┤┬
  608.           ╚»░µ║»╝÷ ░¬└╗ "java"╖╬ ╝│┴ñ╟╤┤┘.</p>
  609.  
  610. <div class="example"><pre>
  611. RewriteEngine on
  612. RewriteRule   ^(.*)/<strong>S=([^/]+)</strong>/(.*)    $1/$3 [E=<strong>STATUS:$2</strong>]
  613. </pre></div>
  614.         </dd>
  615.       </dl>
  616.  
  617.     
  618.  
  619.     <h3>░í╗≤ ╗τ┐δ└┌ ╚ú╜║╞«</h3>
  620.  
  621.       
  622.  
  623.       <dl>
  624.         <dt>╗≤╚▓╝│╕φ:</dt>
  625.  
  626.         <dd>
  627.           <p>░í╗≤╚ú╜║╞«╕ª ╗τ┐δ╟╧┴÷ ╛╩░φ ░░└║ ──╟╗┼═╖╬ DNS A
  628.           ╖╣─┌╡σ╕ª ╝│┴ñ╟╧┐⌐
  629.           <code>www.<strong>username</strong>.host.domain.com</code>└╗
  630.           ╗τ┐δ└┌└╟ ╚¿╞Σ└╠┴÷╖╬ ┴ª░°╟╧░φ ╜═┤┘.</p>
  631.         </dd>
  632.  
  633.         <dt>╟╪░ß├Ñ:</dt>
  634.  
  635.         <dd>
  636.           <p>HTTP/1.0 ┐Σ├╗└╟ ░µ┐∞ ╣µ╣²└╠ ╛°┴÷╕╕, Host: HTTP
  637.           ╟∞┤⌡╕ª ╞≈╟╘╟╤ HTTP/1.1 ┐Σ├╗└║ ┤┘└╜ ▒╘─ó└╗ ╗τ┐δ╟╧┐⌐
  638.           │╗║╬└√└╕╖╬ <code>http://www.username.host.com/anypath</code>╕ª
  639.           <code>/home/username/anypath</code>╖╬ └τ└█╝║╟╥ ╝÷
  640.           └╓┤┘:</p>
  641.  
  642. <div class="example"><pre>
  643. RewriteEngine on
  644. RewriteCond   %{<strong>HTTP_HOST</strong>}                 ^www\.<strong>[^.]+</strong>\.host\.com$
  645. RewriteRule   ^(.+)                        %{HTTP_HOST}$1          [C]
  646. RewriteRule   ^www\.<strong>([^.]+)</strong>\.host\.com(.*) /home/<strong>$1</strong>$2
  647. </pre></div>
  648.         </dd>
  649.       </dl>
  650.  
  651.     
  652.  
  653.     <h3>╚¿╡≡╖║┼Σ╕«╕ª ┐▄║╬ ╝¡╣÷╖╬ ╕«┤┘└╠╖║╝╟</h3>
  654.  
  655.       
  656.  
  657.       <dl>
  658.         <dt>╗≤╚▓╝│╕φ:</dt>
  659.  
  660.         <dd>
  661.           <p>┴÷┐¬ ╡╡╕▐└╬ <code>ourdomain.com</code> ╣█┐í╝¡ ┐Σ├╗└╠
  662.           ╡Θ╛ε┐└╕Θ ╚¿╡≡╖║┼Σ╕« URL└╗ ┤┘╕Ñ └Ñ╝¡╣÷
  663.           <code>www.somewhere.com</code>└╕╖╬ ╕«┤┘╕«╖║╝╟╟╧▒µ
  664.           ╣┘╢⌡┤┘. ┴╛┴╛ ░í╗≤╚ú╜║╞« ╗τ┐δ└σ╝╥┐í╝¡ ╗τ┐δ╟╤┤┘.</p>
  665.         </dd>
  666.  
  667.         <dt>╟╪░ß├Ñ:</dt>
  668.  
  669.         <dd>
  670.           <p>└τ└█╝║ ┴╢░╟└╗ ╗τ┐δ╟╧╕Θ ╡╚┤┘:</p>
  671.  
  672. <div class="example"><pre>
  673. RewriteEngine on
  674. RewriteCond   %{REMOTE_HOST}  <strong>!^.+\.ourdomain\.com$</strong>
  675. RewriteRule   ^(/~.+)         http://www.somewhere.com/$1 [R,L]
  676. </pre></div>
  677.         </dd>
  678.       </dl>
  679.  
  680.     
  681.  
  682.     <h3>╜╟╞╨╟╤ URL└╗ ┤┘╕Ñ └Ñ╝¡╣÷╖╬ ╕«┤┘└╠╖║╝╟</h3>
  683.  
  684.       
  685.  
  686.       <dl>
  687.         <dt>╗≤╚▓╝│╕φ:</dt>
  688.  
  689.         <dd>
  690.           <p>URL └τ└█╝║┐í ┤δ╟╪╝¡ └Ñ╝¡╣÷ A┐í ╟╪┤τ ╞─└╧└╠ ╛°┤┬
  691.           ░µ┐∞ └Ñ╝¡╣÷ B╖╬ ┐Σ├╗└╗ ╕«┤┘└╠╖║╝╟╟╧┤┬ ╣µ╣²└╗ └┌┴╓
  692.           ╣░╛ε║╗┤┘. ║╕┼δ Perl╖╬ └█╝║╟╤ <code class="directive"><a href="../mod/core.html#errordocument">ErrorDocument</a></code> CGI ╜║┼⌐╕│╞«╕ª
  693.           ╗τ┐δ╟╧┴÷╕╕, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╧┤┬
  694.           ╣µ╣²╡╡ └╓┤┘. ▒╫╖»│¬ ╝║┤╔└║ <code class="directive"><a href="../mod/core.html#errordocument">ErrorDocument</a></code> CGI ╜║┼⌐╕│╞«║╕┤┘
  695.           ╢│╛ε┴ⁿ└╗ ╕φ╜╔╟╧╢≤!</p>
  696.         </dd>
  697.  
  698.         <dt>╟╪░ß├Ñ:</dt>
  699.  
  700.         <dd>
  701.           <p>├╣╣°┬░ ╣µ╣²└║ ║ⁿ╕ú┴÷╕╕ └»┐¼╝║└╠ ╢│╛ε┴÷░φ ┐╧└ⁿ╟╧┴÷
  702.           ╛╩┤┘:</p>
  703.  
  704. <div class="example"><pre>
  705. RewriteEngine on
  706. RewriteCond   /your/docroot/%{REQUEST_FILENAME} <strong>!-f</strong>
  707. RewriteRule   ^(.+)                             http://<strong>webserverB</strong>.dom/$1
  708. </pre></div>
  709.  
  710.           <p>└╠ ╣µ╣²└╟ ┤▄┴í└║ <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> ╛╚┐í └╓┤┬ ╞Σ└╠┴÷╕╕
  711.           ░í┤╔╟╧┤┘┤┬ ┴í└╠┤┘. (┐╣╕ª ╡Θ╛ε ╚¿╡≡╖║┼Σ╕« ╡ε└╗ └º╟╪)
  712.           ┴╢░╟└╗ ├▀░í╟╥ ╝÷ └╓┴÷╕╕, ┤⌡ ┴┴└║ ╣µ╣²└╠ └╓┤┘:</p>
  713.  
  714. <div class="example"><pre>
  715. RewriteEngine on
  716. RewriteCond   %{REQUEST_URI} <strong>!-U</strong>
  717. RewriteRule   ^(.+)          http://<strong>webserverB</strong>.dom/$1
  718. </pre></div>
  719.  
  720.           <p><code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>└╟ URL └ⁿ╣µ┬ⁿ┴╢(look-ahead)╕ª
  721.           ╗τ┐δ╟╤┤┘. ▒╫╖í╝¡ ╕≡╡τ URL┐í ╡┐└█╟╧░φ ╛╚└ⁿ╟╧┤┘. ▒╫╖»│¬
  722.           ╕≡╡τ ┐Σ├╗╕╢┤┘ │╗║╬ ╟╧└º┐Σ├╗└╗ ╟╤╣° ┤⌡ ╟╧▒Γ╢º╣«┐í └Ñ╝¡╣÷
  723.           ╝║┤╔┐í ╛╟┐╡╟Γ└╗ ┴╪┤┘. ▒╫╖í╝¡ ░¡╖┬╟╤ CPU┐í╝¡ └Ñ╝¡╣÷╕ª
  724.           ╜╟╟α╟╤┤┘╕Θ ╗τ┐δ╟╧╢≤. ──╟╗┼═░í ┤└╕«┤┘╕Θ ├╣╣°┬░ ╣µ╣²└╠│¬
  725.           ┤⌡ │¬└║ <code class="directive"><a href="../mod/core.html#errordocument">ErrorDocument</a></code>
  726.           CGI ╜║┼⌐╕│╞«╕ª ╗τ┐δ╟╧╢≤.</p>
  727.         </dd>
  728.       </dl>
  729.  
  730.     
  731.  
  732.     <h3>╚«└σ ╕«┤┘└╠╖║╝╟</h3>
  733.  
  734.       
  735.  
  736.       <dl>
  737.         <dt>╗≤╚▓╝│╕φ:</dt>
  738.  
  739.         <dd>
  740.           <p>░í▓√ ╕«┤┘└╠╖║╝╟╟╧┤┬ URL└╗ ┤⌡ ┴╢└²╟╥ ╟╩┐Σ░í └╓┤┘.
  741.           ╛╞╞──í │╗║╬ URL escape ╟╘╝÷┤┬ "<code>url#anchor</code>"
  742.           ░░└║ URL└╟ anchor╡╡ escape╟╤┤┘. ╛╞╞──í└╟
  743.           <code>uri_escape()</code> ╟╘╝÷┤┬ ┐∞╣░┴ñ└┌(#)╡╡ ░░└╠
  744.           escape╟╧╣╟╖╬ ╗τ┐δ╟╥ ╝÷ ╛°┤┘. ▒╫╖»╕Θ ╛ε╢╗░╘ └╠╖▒ URL╖╬
  745.           ╕«┤┘└╠╖║╝╟╟╥ ╝÷ └╓│¬?</p>
  746.         </dd>
  747.  
  748.         <dt>╟╪░ß├Ñ:</dt>
  749.  
  750.         <dd>
  751.           <p>┴≈┴ó ╕«┤┘└╠╖║╝╟╟╧┤┬ NPH-CGI ╜║┼⌐╕│╞«╕ª ╗τ┐δ╟╤ ╟╪░ß├Ñ└╠
  752.           ╟╩┐Σ╟╧┤┘. escape╕ª ╟╧┴÷ ╛╩▒Γ╢º╣«└╠┤┘ (NPH=non-parseable
  753.           headers). ╕╒└· ┤┘└╜ ╝¡╣÷╝│┴ñ└╗ ╟╧┐⌐ (└τ└█╝║ ▒╘─ó└╟
  754.           │í║╬║╨┐í ╗τ┐δ╟╪╛▀ ╟╤┤┘) ╗⌡╖╬┐ε URL scheme
  755.           <code>xredirect:</code>╕ª ╡╡└╘╟╤┤┘:</p>
  756.  
  757. <div class="example"><pre>
  758. RewriteRule ^xredirect:(.+) /path/to/nph-xredirect.cgi/$1 \
  759.             [T=application/x-httpd-cgi,L]
  760. </pre></div>
  761.  
  762.           <p>▒╫╖»╕Θ <code>xredirect:</code>╖╬ ╜├└█╟╧┤┬ ╕≡╡τ URL└║
  763.           <code>nph-xredirect.cgi</code> ╟┴╖╬▒╫╖Ñ└╗ ┼δ╟╧░╘ ╡╚┤┘.
  764.           ╟┴╖╬▒╫╖Ñ└║ ┤┘└╜░· ░░┤┘:</p>
  765.  
  766. <div class="example"><pre>
  767. #!/path/to/perl
  768. ##
  769. ##  nph-xredirect.cgi -- NPH/CGI script for extended redirects
  770. ##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
  771. ##
  772.  
  773. $| = 1;
  774. $url = $ENV{'PATH_INFO'};
  775.  
  776. print "HTTP/1.0 302 Moved Temporarily\n";
  777. print "Server: $ENV{'SERVER_SOFTWARE'}\n";
  778. print "Location: $url\n";
  779. print "Content-type: text/html\n";
  780. print "\n";
  781. print "<html>\n";
  782. print "<head>\n";
  783. print "<title>302 Moved Temporarily (EXTENDED)</title>\n";
  784. print "</head>\n";
  785. print "<body>\n";
  786. print "<h1>Moved Temporarily (EXTENDED)</h1>\n";
  787. print "The document has moved <a HREF=\"$url\">here</a>.<p>\n";
  788. print "</body>\n";
  789. print "</html>\n";
  790.  
  791. ##EOF##
  792. </pre></div>
  793.  
  794.           <p>▒╫╖»╕Θ <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>░í ┴≈┴ó ╣▐┴÷╕°╟╧┤┬
  795.           ╕≡╡τ URL scheme└╕╖╬ ╕«┤┘└╠╖║╝╟╟╥ ╝÷ └╓┤┘. ┐╣╕ª ╡Θ╛ε,
  796.           ┤┘└╜░· ░░└╠ <code>news:newsgroup</code>└╕╖╬ ╕«┤┘└╠╖║╝╟╟╥
  797.           ╝÷ └╓┤┘</p>
  798.  
  799. <div class="example"><pre>
  800. RewriteRule ^anyurl  xredirect:news:newsgroup
  801. </pre></div>
  802.  
  803.           <div class="note">┴╓└╟: └º└╟ ╞»║░╟╤ "┼δ░·" ▒╘─ó└╗ ╗τ┐δ╟╧┐⌐
  804.           <code>xredirect:</code>╕ª ╕╢┴÷╕╖┐í ╚«└σ╟╪╛▀ ╟╧▒Γ╢º╣«┐í
  805.           ▒╘─ó┐í <code>[R]</code>└╠│¬ <code>[R,L]</code>└╗ ╗τ┐δ╟╧╕Θ
  806.           ╛╚╡╚┤┘.</div>
  807.         </dd>
  808.       </dl>
  809.  
  810.     
  811.  
  812.     <h3>└·└σ╝╥ ┴ó▒┘ ┴▀░Φ(multiplexer)</h3>
  813.  
  814.       
  815.  
  816.       <dl>
  817.         <dt>╗≤╚▓╝│╕φ:</dt>
  818.  
  819.         <dd>
  820.           <p><a href="http://www.perl.com/CPAN">http://www.perl.com/CPAN</a>┐í
  821.           └╓┤┬ ┤δ┤▄╟╤ CPAN (Comprehensive Perl Archive Network)└╗
  822.           ╛╞┤┬░í? └╠ ┴╓╝╥┤┬ ╝╝░Φ┐í ╚≡╛ε┴° ┐⌐╖» CPAN ╣╠╖» FTP
  823.           ╝¡╣÷┴▀ ┼¼╢≤└╠╛≡╞«┐í ░í▒ε└╠ └╓┤┬ ╝¡╣÷╖╬ ╕«┤┘└╠╖║╝╟╟╤┤┘.
  824.           └╠╕ª FTP ┴ó▒┘ ┴▀░Φ ╝¡║±╜║╢≤░φ ╟╤┤┘. CPAN└║ CGI ╜║┼⌐╕│╞«╕ª
  825.           ╗τ┐δ╟╧┴÷╕╕, <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╧┐⌐
  826.           ║±╜┴╟╧░╘ ╕╕╡Θ ╝÷ └╓└╗▒ε?</p>
  827.         </dd>
  828.  
  829.         <dt>╟╪░ß├Ñ:</dt>
  830.  
  831.         <dd>
  832.           <p>╕╒└· <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> 3.0.0 ╣÷└ⁿ║╬┼═
  833.           ╕«┤┘└╠╖║╝╟┐í "<code>ftp:</code>" scheme└╗ ╗τ┐δ╟╥ ╝÷
  834.           └╓┤┘. ┤┘└╜└╕╖╬ ┼¼╢≤└╠╛≡╞«└╟ ├╓╗≤└º ╡╡╕▐└╬└╗ <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>░· ░░└╠
  835.           ╗τ┐δ╟╧┐⌐ └º─í╕ª ├▀┴ñ╟╥ ╝÷ └╓┤┘. ║╣└Γ╚≈ ┐½└╬ ▒╘─ó┐í╝¡
  836.           ├╓╗≤└º ╡╡╕▐└╬└╗ ┴▀░Φ╕╩└╟ ┼░╖╬ ╗τ┐δ╟╤┤┘.</p>
  837.  
  838. <div class="example"><pre>
  839. RewriteEngine on
  840. RewriteMap    multiplex                txt:/path/to/map.cxan
  841. RewriteRule   ^/CxAN/(.*)              %{REMOTE_HOST}::$1                 [C]
  842. RewriteRule   ^.+\.<strong>([a-zA-Z]+)</strong>::(.*)$  ${multiplex:<strong>$1</strong>|ftp.default.dom}$2  [R,L]
  843. </pre></div>
  844.  
  845. <div class="example"><pre>
  846. ##
  847. ##  map.cxan -- Multiplexing Map for CxAN
  848. ##
  849.  
  850. de        ftp://ftp.cxan.de/CxAN/
  851. uk        ftp://ftp.cxan.uk/CxAN/
  852. com       ftp://ftp.cxan.com/CxAN/
  853.  :
  854. ##EOF##
  855. </pre></div>
  856.         </dd>
  857.       </dl>
  858.  
  859.     
  860.  
  861.     <h3>╜├░ú┐í ╡√╕Ñ └τ└█╝║</h3>
  862.  
  863.       
  864.  
  865.       <dl>
  866.         <dt>╗≤╚▓╝│╕φ:</dt>
  867.  
  868.         <dd>
  869.           <p>╜├░ú┐í ╡√╢≤ ┤┘╕Ñ │╗┐δ└╗ ╝¡║±╜║╟╧┤┬ ░µ┐∞ ╕╣└║ └Ñ░ⁿ╕«└┌┤┬
  870.           └ß╜├ ╞»║░╟╤ ╞Σ└╠┴÷╖╬ ╕«┤┘└╠╖║╝╟╟╧▒Γ└º╟╪ CGI ╜║┼⌐╕│╞«╕ª
  871.           ╗τ┐δ╟╤┤┘. <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╖╬┤┬ ╛ε╢╗░╘
  872.           ╟╥ ╝÷ └╓┤┬░í?</p>
  873.         </dd>
  874.  
  875.         <dt>╟╪░ß├Ñ:</dt>
  876.  
  877.         <dd>
  878.           <p>└τ└█╝║ ┴╢░╟┐í╝¡ ╗τ┐δ╟╥ ╝÷ └╓┤┬ ┐⌐╖» <code>TIME_xxx</code>
  879.           ║»╝÷░í └╓┤┘. ║»╝÷┐═ ╞»║░╟╤ ╗τ└ⁿ╝°╝¡ ║±▒│
  880.           <code><STRING</code>, <code>>STRING</code>,
  881.           <code>=STRING</code>└╗ ╗τ┐δ╟╧┐⌐ ╜├░ú┐í ╡√╢≤ ╕«┤┘└╠╖║╝╟╟╥
  882.           ╝÷ └╓┤┘:</p>
  883.  
  884. <div class="example"><pre>
  885. RewriteEngine on
  886. RewriteCond   %{TIME_HOUR}%{TIME_MIN} >0700
  887. RewriteCond   %{TIME_HOUR}%{TIME_MIN} <1900
  888. RewriteRule   ^foo\.html$             foo.day.html
  889. RewriteRule   ^foo\.html$             foo.night.html
  890. </pre></div>
  891.  
  892.           <p>URL <code>foo.html</code>└╗ ┐Σ├╗╟╧╕Θ
  893.           <code>07:00-19:00</code> ╡┐╛╚ <code>foo.day.html</code>
  894.           │╗┐δ└╗ ╝¡║±╜║╟╧░φ, │¬╕╙┴÷ ╜├░ú ╡┐╛╚
  895.           <code>foo.night.html</code> │╗┐δ└╗ ╝¡║±╜║╟╤┤┘. ╚¿╞Σ└╠┴÷┐í╝¡
  896.           ╗τ┐δ╟╧▒Γ ┴┴└║ ▒Γ┤╔└╠┤┘...</p>
  897.         </dd>
  898.       </dl>
  899.  
  900.     
  901.  
  902.     <h3>YYYY╕ª XXXX╖╬ └╠└ⁿ╟╤ ░µ┐∞ ┐¬╚ú╚»</h3>
  903.  
  904.       
  905.  
  906.       <dl>
  907.         <dt>╗≤╚▓╝│╕φ:</dt>
  908.  
  909.         <dd>
  910.           <p>┐⌐╖» <code>.html</code> ╞─└╧└╗ <code>.phtml</code>╖╬
  911.           ║»╚»╟╧┤┬ ╡ε <code>document.YYYY</code>╕ª
  912.           <code>document.XXXX</code>╖╬ └╠└ⁿ╟╤╚─ ┐¬╚ú╚»(backward
  913.           compatibility) URL└╗ (░í╗≤└√└╕╖╬ ┴╕└τ╟╧░╘) ╕╕╡Θ ╝÷
  914.           └╓│¬?</p>
  915.         </dd>
  916.  
  917.         <dt>╟╪░ß├Ñ:</dt>
  918.  
  919.         <dd>
  920.           <p>└╠╕º└╗ ▒Γ║╗└╠╕º└╕╖╬ └τ└█╝║╟╤╚─ ╗⌡╖╬┐ε ╚«└σ└┌╕ª
  921.           ░í┴° ╞─└╧└╠ └╓┤┬┴÷ ░╦╗τ╟╤┤┘. └╓┤┘╕Θ ▒╫ ╞─└╧╕φ└╗ ╗τ┐δ╟╧░φ,
  922.           ╛°└╕╕Θ URL└╗ ┐°╖í ╗≤┼┬╖╬ └τ└█╝║╟╤┤┘.</p>
  923.  
  924.  
  925. <div class="example"><pre>
  926. #   ╣«╝¡.html └╠ ╛°░φ
  927. #   ╣«╝¡.phtml ╕╕ └╓┤┬ ░µ┐∞
  928. #   ╣«╝¡.html └╗ ╣«╝¡.phtml ╖╬
  929. #   └τ└█╝║╟╧┤┬ ┐¬╚ú╚» ▒╘─ó
  930. RewriteEngine on
  931. RewriteBase   /~quux/
  932. #   ▒Γ║╗└╠╕º└╗ ├ú░φ, ├ú╛╥┤┘┤┬ ╗τ╜╟└╗ ▒Γ╛∩╟╤┤┘
  933. RewriteRule   ^(.*)\.html$              $1      [C,E=WasHTML:yes]
  934. #   ╞─└╧└╠ └╓┤┘╕Θ ╣«╝¡.phtml ╖╬ └τ└█╝║╟╤┤┘
  935. RewriteCond   %{REQUEST_FILENAME}.phtml -f
  936. RewriteRule   ^(.*)$ $1.phtml                   [S=1]
  937. #   ╛╞┤╧╕Θ ╛╒┐í╝¡ ├ú└║ ▒Γ║╗└╠╕º└╗ ╡╟╡╣╕░┤┘
  938. RewriteCond   %{ENV:WasHTML}            ^yes$
  939. RewriteRule   ^(.*)$ $1.html
  940. </pre></div>
  941.         </dd>
  942.       </dl>
  943.  
  944.     
  945.  
  946.   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  947. <div class="section">
  948. <h2><a name="content" id="content">─┴┼┘├≈ ┤┘╖τ▒Γ</a></h2>
  949.  
  950.     
  951.  
  952.     <h3>╗⌡╖╬ └╠└ⁿ (░¿├▀▒Γ)</h3>
  953.  
  954.       
  955.  
  956.       <dl>
  957.         <dt>╗≤╚▓╝│╕φ:</dt>
  958.  
  959.         <dd>
  960.           <p>├╓▒┘ <code>foo.html</code>└╗ <code>bar.html</code>╖╬
  961.           ║»░µ╟╧░φ ┐¬╚ú╚»╝║└╗ └º╟╪ └╠└ⁿ URL└╗ ░Φ╝╙ ┴ª░°╟╧░φ
  962.           ╜═┤┘░φ ░í┴ñ╟╧└┌. ╗τ┐δ└┌┤┬ └╠└ⁿ URL└╠ ║»░µ╡╟╛·┤┘┤┬
  963.           ╗τ╜╟└╗ ┤½─í├ñ┴÷ ╕°╟╤┤┘.</p>
  964.         </dd>
  965.  
  966.         <dt>╟╪░ß├Ñ:</dt>
  967.  
  968.         <dd>
  969.           <p>┤┘└╜ ▒╘─ó└╕╖╬ └╠└ⁿ URL└╗ │╗║╬└√└╕╖╬ ╗⌡╖╬┐ε URL╖╬
  970.           └τ└█╝║╟╤┤┘:</p>
  971.  
  972. <div class="example"><pre>
  973. RewriteEngine  on
  974. RewriteBase    /~quux/
  975. RewriteRule    ^<strong>foo</strong>\.html$  <strong>bar</strong>.html
  976. </pre></div>
  977.         </dd>
  978.       </dl>
  979.  
  980.     
  981.  
  982.     <h3>╗⌡╖╬ └╠└ⁿ (╛╦╕«▒Γ)</h3>
  983.  
  984.       
  985.  
  986.       <dl>
  987.         <dt>╗≤╚▓╝│╕φ:</dt>
  988.  
  989.         <dd>
  990.           <p>┤┘╜├ <code>foo.html</code>└╗ <code>bar.html</code>╖╬
  991.           ║»░µ╟╧░φ ┐¬╚ú╚»╝║└╗ └º╟╪ └╠└ⁿ URL└╗ ░Φ╝╙ ┴ª░°╟╧░φ
  992.           ╜═┤┘░φ ░í┴ñ╟╧└┌. ▒╫╖»│¬ └╠┴ª┤┬ └╠└ⁿ URL└╗ ╗τ┐δ╟╧╕Θ
  993.           ╗τ┐δ└┌┐í░╘ ╗⌡╖╬┐ε URL└╗ ╚∙╞«╖╬ ╛╦╖┴┴╪┤┘. ┴∩, ║Ω╢≤┐∞└·
  994.           ┴╓╝╥├ó└╠ ║»╟╤┤┘.</p>
  995.         </dd>
  996.  
  997.         <dt>╟╪░ß├Ñ:</dt>
  998.  
  999.         <dd>
  1000.           <p>╗⌡╖╬┐ε URL╖╬ HTTP ╕«┤┘└╠╖║╝╟╟╧┤┘. ▒╫╖»╕Θ ║Ω╢≤┐∞└·░í
  1001.           ╗⌡╖╬┐ε URL╕ª ║╕└╠░φ ║»░µ╗τ╜╟└╗ ╗τ┐δ└┌░í ╛╦░╘╡╚┤┘:</p>
  1002.  
  1003. <div class="example"><pre>
  1004. RewriteEngine  on
  1005. RewriteBase    /~quux/
  1006. RewriteRule    ^<strong>foo</strong>\.html$  <strong>bar</strong>.html  [<strong>R</strong>]
  1007. </pre></div>
  1008.         </dd>
  1009.       </dl>
  1010.  
  1011.     
  1012.  
  1013.     <h3>║Ω╢≤┐∞└·┐í ╡√╕Ñ │╗┐δ</h3>
  1014.  
  1015.       
  1016.  
  1017.       <dl>
  1018.         <dt>╗≤╚▓╝│╕φ:</dt>
  1019.  
  1020.         <dd>
  1021.           <p>├╓╝╥╟╤ ┴▀┐Σ╟╤ ├╓╗≤└º ╞Σ└╠┴÷┤┬ ║Ω╢≤┐∞└·┐í ├╓└√╚¡╡╚
  1022.           │╗┐δ└╕╖╬ ╝¡║±╜║╟╪╛▀╟╥ ░µ┐∞░í └╓┤┘. ┴∩, ├╓╜┼ Netscape
  1023.           ║Ω╢≤┐∞└·┐í░╘┤┬ ├╓╗≤└╟ ╣÷└ⁿ└╗, Lynx ║Ω╢≤┐∞└·┐í░╘┤┬
  1024.           ├╓└· ╣÷└ⁿ└╗, │¬╕╙┴÷ ║Ω╢≤┐∞└·┐í┤┬ ╞≥▒╒└√└╬ ╣÷└ⁿ└╗
  1025.           ┴ª░°╟╤┤┘.</p>
  1026.         </dd>
  1027.  
  1028.         <dt>╟╪░ß├Ñ:</dt>
  1029.  
  1030.         <dd>
  1031.           <p>║Ω╢≤┐∞└·░í │╗┐δ╟∙╗≤└╗ └º╟╪ └┌╜┼└╟ ┴╛╖∙┐í ┤δ╟╤ ┴ñ║╕╕ª
  1032.           ┴ª░°╟╧┴÷ ╛╩▒Γ╢º╣«┐í │╗┐δ╟∙╗≤└╗ ╗τ┐δ╟╥ ╝÷ ╛°┤┘. ┤δ╜┼
  1033.           HTTP "User-Agent" ╟∞┤⌡╕ª ╗τ┐δ╟╤┤┘. ┤┘└╜ ▒╘─ó└║ HTTP
  1034.           "User-Agent" ╟∞┤⌡░í "Mozilla/3"└╕╖╬ ╜├└█╟╧╕Θ
  1035.           <code>foo.html</code> ╞Σ└╠┴÷╕ª <code>foo.NS.html</code>╖╬
  1036.           └τ└█╝║╟╧░φ └τ└█╝║└╗ ┴▀┤▄╟╤┤┘. ║Ω╢≤┐∞└·░í "Lynx"│¬
  1037.           "Mozilla" ╣÷└ⁿ 1 ╚ñ└║ 2╢≤╕Θ URL└║
  1038.           <code>foo.20.html</code>└╠ ╡╚┤┘. │¬╕╙┴÷ ║Ω╢≤┐∞└·┤┬
  1039.           <code>foo.32.html</code> ╞Σ└╠┴÷╕ª ╣▐┤┬┤┘. ╛╞╖í ▒╘─ó└╠
  1040.           └╠ └█╛≈└╗ ╟╤┤┘:</p>
  1041.  
  1042. <div class="example"><pre>
  1043. RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/3</strong>.*
  1044. RewriteRule ^foo\.html$         foo.<strong>NS</strong>.html          [<strong>L</strong>]
  1045.  
  1046. RewriteCond %{HTTP_USER_AGENT}  ^<strong>Lynx/</strong>.*         [OR]
  1047. RewriteCond %{HTTP_USER_AGENT}  ^<strong>Mozilla/[12]</strong>.*
  1048. RewriteRule ^foo\.html$         foo.<strong>20</strong>.html          [<strong>L</strong>]
  1049.  
  1050. RewriteRule ^foo\.html$         foo.<strong>32</strong>.html          [<strong>L</strong>]
  1051. </pre></div>
  1052.         </dd>
  1053.       </dl>
  1054.  
  1055.     
  1056.  
  1057.     <h3>╡┐└√ ╣╠╖»</h3>
  1058.  
  1059.       
  1060.  
  1061.       <dl>
  1062.         <dt>╗≤╚▓╝│╕φ:</dt>
  1063.  
  1064.         <dd>
  1065.           <p>┐▄║╬ ╚ú╜║╞«┐í ┐∞╕« ╗τ└╠╞«╖╬ ░í┴«┐└░φ ╜═└║ ┴┴└║
  1066.           └Ñ╞Σ└╠┴÷░í └╓┤┘░φ ░í┴ñ╟╧└┌. FTP ╝¡╣÷└╟ ░µ┐∞ ┴≈┴ó ┐▄║╬
  1067.           └┌╖ß└╟ ├╓╜┼║╣╗τ║╗└╗ └»┴÷╟╧┤┬ <code>mirror</code> ╟┴╖╬▒╫╖Ñ└╗
  1068.           ╗τ┐δ╟╥ ╝÷ └╓░φ, └Ñ╝¡╣÷╢≤╕Θ HTTP╖╬ ║±╜┴╟╤ └█╛≈└╗ ╟╧┤┬
  1069.           <code>webcopy</code> ╟┴╖╬▒╫╖Ñ└╗ ╗τ┐δ╟╥ ╝÷ └╓┤┘. ▒╫╖»│¬
  1070.           ╡╬ ╣µ╣² ╕≡╡╬ ┤▄┴í└╠ └╓┤┘: ║╣╗τ║╗└║ ░í▓√╛┐ ╟┴╖╬▒╫╖Ñ└╗
  1071.           ╜╟╟α╟╪┴┘ ╢º╕╕ ├╓╜┼╞╟└╕╖╬ └»┴÷╡╚┤┘. ┴≈┴ó ▒╕╝║╟╪╛▀╟╧┤┬
  1072.           ┴ñ└√└╬ ╣╠╖»░í ╛╞┤╧╢≤╕Θ ┴┴░┌┤┘. ┤δ╜┼ (┐▄║╬ ╚ú╜║╞«┐í╝¡
  1073.           └┌╖ß░í ░╗╜┼╡╟╕Θ) ╟╩┐Σ╟╥╢º └┌╡┐└╕╖╬ └┌╖ß╕ª ░╗╜┼╟╧┤┬
  1074.           ╡┐└√ ╣╠╖»░í ╟╩┐Σ╟╧┤┘.</p>
  1075.         </dd>
  1076.  
  1077.         <dt>╟╪░ß├Ñ:</dt>
  1078.  
  1079.         <dd>
  1080.           <p>└╠╕ª └º╟╪ <dfn>Proxy Throughput</dfn> ▒Γ┤╔└╗ (╟├╖í▒╫
  1081.           <code>[P]</code>) ╗τ┐δ╟╧┐⌐ ┐▄║╬ └Ñ╞Σ└╠┴÷ ╚ñ└║ ┐▄║╬
  1082.           └Ñ░°░ú └ⁿ├╝╕ª ┐∞╕« └╠╕º░°░ú└╕╖╬ ┤δ└└╟╤┤┘:</p>
  1083.  
  1084. <div class="example"><pre>
  1085. RewriteEngine  on
  1086. RewriteBase    /~quux/
  1087. RewriteRule    ^<strong>hotsheet/</strong>(.*)$  <strong>http://www.tstimpreso.com/hotsheet/</strong>$1  [<strong>P</strong>]
  1088. </pre></div>
  1089.  
  1090. <div class="example"><pre>
  1091. RewriteEngine  on
  1092. RewriteBase    /~quux/
  1093. RewriteRule    ^<strong>usa-news\.html</strong>$   <strong>http://www.quux-corp.com/news/index.html</strong>  [<strong>P</strong>]
  1094. </pre></div>
  1095.         </dd>
  1096.       </dl>
  1097.  
  1098.     
  1099.  
  1100.     <h3>╡┐└√ ┐¬╣╠╖»</h3>
  1101.  
  1102.       
  1103.  
  1104.       <dl>
  1105.         <dt>╗≤╚▓╝│╕φ:</dt>
  1106.  
  1107.         <dd>...</dd>
  1108.  
  1109.         <dt>╟╪░ß├Ñ:</dt>
  1110.  
  1111.         <dd>
  1112. <div class="example"><pre>
  1113. RewriteEngine on
  1114. RewriteCond   /mirror/of/remotesite/$1           -U
  1115. RewriteRule   ^http://www\.remotesite\.com/(.*)$ /mirror/of/remotesite/$1
  1116. </pre></div>
  1117.         </dd>
  1118.       </dl>
  1119.  
  1120.     
  1121.  
  1122.     <h3>╛°┤┬ └┌╖ß╕ª └╬╞«╢≤│▌┐í╝¡ ░í┴«┐└▒Γ</h3>
  1123.  
  1124.       
  1125.  
  1126.       <dl>
  1127.         <dt>╗≤╚▓╝│╕φ:</dt>
  1128.  
  1129.         <dd>
  1130.           <p>╜╟┴ª └┌╖ß╕ª ╣µ╚¡║«└╠ ║╕╚ú╟╧┤┬ (│╗║╬) └╬╞«╢≤│▌ └Ñ╝¡╣÷┐í
  1131.           (<code>www2.quux-corp.dom</code>) └·└σ╟╧╕Θ╝¡, ▒Γ╛≈└╟
  1132.           (┐▄║╬) └╬┼═│▌ └Ñ╝¡╣÷╕ª (<code>www.quux-corp.dom</code>)
  1133.           ╜╟╟α╟╧┤┬ ░═├│╖│ ║╕└╠░╘ ╟╤┤┘. ┐▄║╬ └Ñ╝¡╣÷┤┬ ┐Σ├╗╟╤
  1134.           └┌╖ß╕ª │╗║╬ └Ñ╝¡╣÷┐í╝¡ ░í┴«┐┬┤┘.</p>
  1135.         </dd>
  1136.  
  1137.         <dt>╟╪░ß├Ñ:</dt>
  1138.  
  1139.         <dd>
  1140.           <p>╕╒└· ╣µ╚¡║«└╠ │╗║╬ └Ñ╝¡╣÷╕ª ║╕╚ú╟╧░φ ┐▄║╬ └Ñ╝¡╣÷╕╕└╠
  1141.           │╗║╬ └Ñ╝¡╣÷┐í╝¡ └┌╖ß╕ª ╛≥└╗ ╝÷ └╓░╘ ╟╤┤┘. ┤┘└╜░· ░░└╠
  1142.           ╞╨┼╢╟╩┼═╕╡ ╣µ╚¡║«└╗ ╝│┴ñ╟╤┤┘:</p>
  1143.  
  1144. <div class="example"><pre>
  1145. <strong>ALLOW</strong> Host www.quux-corp.dom Port >1024 --> Host www2.quux-corp.dom Port <strong>80</strong>
  1146. <strong>DENY</strong>  Host *                 Port *     --> Host www2.quux-corp.dom Port <strong>80</strong>
  1147. </pre></div>
  1148.  
  1149.           <p>╜╟┴ª ╝│┴ñ╣«╣²┐í ╛╦╕┬░╘ ░φ├─╢≤. ╛°┤┬ └┌╖ß╕ª │╗║╬└√└╕╖╬
  1150.           proxy throughput ▒Γ┤╔└╗ ┼δ╟╪ ┐Σ├╗╟╧┤┬
  1151.           <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> ▒╘─ó└╗ └█╝║╟╤┤┘:</p>
  1152.  
  1153. <div class="example"><pre>
  1154. RewriteRule ^/~([^/]+)/?(.*)          /home/$1/.www/$2
  1155. RewriteCond %{REQUEST_FILENAME}       <strong>!-f</strong>
  1156. RewriteCond %{REQUEST_FILENAME}       <strong>!-d</strong>
  1157. RewriteRule ^/home/([^/]+)/.www/?(.*) http://<strong>www2</strong>.quux-corp.dom/~$1/pub/$2 [<strong>P</strong>]
  1158. </pre></div>
  1159.         </dd>
  1160.       </dl>
  1161.  
  1162.     
  1163.  
  1164.     <h3>╖╬╡σ╣δ╖▒╜╠ (║╬╟╧ ║╨╗Ω╟╧▒Γ)</h3>
  1165.  
  1166.       
  1167.  
  1168.       <dl>
  1169.         <dt>╗≤╚▓╝│╕φ:</dt>
  1170.  
  1171.         <dd>
  1172.           <p><code>www.foo.com</code>└╟ ┼δ╜┼╖«└╗
  1173.           <code>www[0-5].foo.com</code> (├╤ ╝¡╣÷ 6┤δ)└╕╖╬ ║╨╗Ω╟╧░φ
  1174.           ╜═┤┘. ╛ε╢╗░╘ ╟╧┤┬░í?</p>
  1175.         </dd>
  1176.  
  1177.         <dt>╟╪░ß├Ñ:</dt>
  1178.  
  1179.         <dd>
  1180.           <p>╕┼┐∞ ┤┘╛τ╟╤ ╣µ╣²└╕╖╬ └╠ ╣«┴ª╕ª ╟╪░ß╟╥ ╝÷ └╓┤┘.
  1181.           ╕╒└· DNS╕ª ╗τ┐δ╟╤ └▀ ╛╦╖┴┴° ╣µ╣²└╗ ╝│╕φ╟╧░φ,
  1182.           <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╕ª ╗τ┐δ╟╧┤┬ ░µ┐∞╕ª ╗∞╞∞║╕└┌:</p>
  1183.  
  1184.           <ol>
  1185.             <li>
  1186.               <strong>DNS Round-Robin</strong>
  1187.  
  1188.               <p>░í└σ ░ú┤▄╟╤ ╖╬╡σ╣δ╖▒╜╠ ╣µ╣²└║ <code>BIND</code>└╟
  1189.               DNS round-robin ╣µ╜─└╗ ╗τ┐δ╟╧┤┬ ░═└╠┤┘. ┤┘└╜░·
  1190.               ░░└╠ DNS A(address) ╖╣─┌╡σ┐í
  1191.               <code>www[0-9].foo.com</code>└╗ ╝│┴ñ╟╤┤┘.</p>
  1192.  
  1193. <div class="example"><pre>
  1194. www0   IN  A       1.2.3.1
  1195. www1   IN  A       1.2.3.2
  1196. www2   IN  A       1.2.3.3
  1197. www3   IN  A       1.2.3.4
  1198. www4   IN  A       1.2.3.5
  1199. www5   IN  A       1.2.3.6
  1200. </pre></div>
  1201.  
  1202.               <p>▒╫╕«░φ ┤┘└╜ ╟╫╕±└╗ ├▀░í╟╤┤┘:</p>
  1203.  
  1204. <div class="example"><pre>
  1205. www    IN  CNAME   www0.foo.com.
  1206.        IN  CNAME   www1.foo.com.
  1207.        IN  CNAME   www2.foo.com.
  1208.        IN  CNAME   www3.foo.com.
  1209.        IN  CNAME   www4.foo.com.
  1210.        IN  CNAME   www5.foo.com.
  1211.        IN  CNAME   www6.foo.com.
  1212. </pre></div>
  1213.  
  1214.               <p>└▀╕°╡╚ ░═├│╖│ ║╕└╠┴÷╕╕, ╜╟┴ª╖╬ <code>BIND</code>└╟
  1215.               └╟╡╡╡╚ ▒Γ┤╔└╠┤┘. └╠┴ª <code>www.foo.com</code>└╗
  1216.               ├ú└╕╕Θ, <code>BIND</code>┤┬ ╕┼╣° ╝°╝¡╕ª ┴╢▒▌╛┐
  1217.               ╣┘▓π░í╕τ <code>www0-www6</code>└╗ ╣▌╚»╟╤┤┘. ▒╫╖í╝¡
  1218.               ┼¼╢≤└╠╛≡╞«╡Θ└╗ ┐⌐╖» ╝¡╣÷╖╬ ║╨╗Ω╟╤┤┘. ▒╫╖»│¬ DNS
  1219.               ░╦╗÷ ░ß░·░í │╫╞«┐≈└╟ ┤┘╕Ñ │╫└╙╝¡╣÷┐í ─│╜¼╡╟┐⌐
  1220.               <code>www.foo.com</code>└╗ ├ú└║ ░ß░·░í ╞»┴ñ
  1221.               <code>wwwN.foo.com</code>└╠╕Θ ┼¼╢≤└╠╛≡╞«└╟ ┤┘└╜
  1222.               ┐Σ├╗╡Θ╡╡ ░░└║ <code>wwwN.foo.com</code>└╕╖╬
  1223.               ║╕│╗┴÷▒Γ╢º╣«┐í ┐╧║«╟╤ ╖╬╡σ╣δ╖▒╜╠ ▒Γ╣²└╠ ╛╞┤╘└╗
  1224.               ┴╓└╟╟╧╢≤. ▒╫╖»│¬ ┼⌐░╘ ║╕╕Θ ┐Σ├╗└╠ ┐⌐╖» └Ñ╝¡╣÷┐í
  1225.               ║╨╗Ω╡╟╣╟╖╬ ╚┐░·░í ┴┴┤┘.</p>
  1226.             </li>
  1227.  
  1228.             <li>
  1229.               <strong>DNS ╖╬╡σ╣δ╖▒╜╠</strong>
  1230.  
  1231.               <p><a href="http://www.stanford.edu/~schemers/docs/lbnamed/lbnamed.html">http://www.stanford.edu/~schemers/docs/lbnamed/lbnamed.html</a>┐í
  1232.               └╓┤┬ <code>lbnamed</code> ╟┴╖╬▒╫╖Ñ└╗ ╗τ┐δ╟╧┐⌐
  1233.               ┴ñ▒│╟╤ DNS▒Γ╣▌ ╖╬╡σ╣δ╖▒╜╠└╗ ╟╥ ╝÷ └╓┤┘. DNS░í
  1234.               ╜╟┴ª ╖╬╡σ╣δ╖▒╜╠└╗ ╟╧╡╡╖╧ ╕╕╡σ┤┬ ┐⌐╖» ╡╡▒╕┐═ Perl
  1235.               5 ╟┴╖╬▒╫╖Ñ└╠┤┘.</p>
  1236.             </li>
  1237.  
  1238.             <li>
  1239.               <strong>Proxy Throughput Round-Robin</strong>
  1240.  
  1241.               <p>└╠ ╣µ╣²└║ <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>┐═ proxy
  1242.               throughput ▒Γ┤╔└╗ ╗τ┐δ╟╤┤┘. ╕╒└· DNS┐í ┤┘└╜ ╟╫╕±└╗
  1243.               ╗τ┐δ╟╧┐⌐ <code>www0.foo.com</code>└╠ ╜╟┴ª
  1244.               <code>www.foo.com</code>└╗ └ⁿ┤π╟╧░╘ ╟╤┤┘</p>
  1245.  
  1246. <div class="example"><pre>
  1247. www    IN  CNAME   www0.foo.com.
  1248. </pre></div>
  1249.  
  1250.               <p>▒╫╕«░φ <code>www0.foo.com</code>└╗ ╟┴╖╧╜├└ⁿ┐δ
  1251.               ╝¡╣÷╖╬ ║»░µ╟╤┤┘. ┴∩, URL└╗ ╣▐└╕╕Θ ╝¡╣÷┤┬ │╗║╬
  1252.               ╟┴╖╧╜├╕ª ┼δ╟╪ ┤┘╕Ñ 5┤δ ╝¡╣÷┴▀ (<code>www1-www5</code>)
  1253.               ╟╤┤δ╖╬ ║╕│╗▒Γ╕╕ ╟╤┤┘. └╠╕ª └º╟╪ ╕╒└· ╕≡╡τ URL└╗
  1254.               ╖╬╡σ╣δ╖▒╜╠ ╜║┼⌐╕│╞« <code>lb.pl</code>╖╬ ║╕│╗┤┬
  1255.               ▒╘─ó└╗ ╕╕╡τ┤┘.</p>
  1256.  
  1257. <div class="example"><pre>
  1258. RewriteEngine on
  1259. RewriteMap    lb      prg:/path/to/lb.pl
  1260. RewriteRule   ^/(.+)$ ${lb:$1}           [P,L]
  1261. </pre></div>
  1262.  
  1263.               <p><code>lb.pl</code>└╗ └█╝║╟╤┤┘:</p>
  1264.  
  1265. <div class="example"><pre>
  1266. #!/path/to/perl
  1267. ##
  1268. ##  lb.pl -- ╖╬╡σ╣δ╖▒╜╠ ╜║┼⌐╕│╞«
  1269. ##
  1270.  
  1271. $| = 1;
  1272.  
  1273. $name   = "www";     # ▒Γ║╗ ╚ú╜║╞«╕φ
  1274. $first  = 1;         # ├╣╣°┬░ ╝¡╣÷ (└┌╜┼└╠ 0└╠▒Γ ╢º╣«┐í, 0└╗ ╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘)
  1275. $last   = 5;         # round-robin┐í╝¡ ╕╢┴÷╕╖ ╝¡╣÷
  1276. $domain = "foo.dom"; # ╡╡╕▐└╬╕φ
  1277.  
  1278. $cnt = 0;
  1279. while (<STDIN>) {
  1280.     $cnt = (($cnt+1) % ($last+1-$first));
  1281.     $server = sprintf("%s%d.%s", $name, $cnt+$first, $domain);
  1282.     print "http://$server/$_";
  1283. }
  1284.  
  1285. ##EOF##
  1286. </pre></div>
  1287.  
  1288.               <div class="note">╕╢┴÷╕╖ ┴╓└╟: ┐╓ └╠ ╣µ╣²└╠ └»┐δ╟╤░í?
  1289.               <code>www0.foo.com</code>┐í ║╬┤π└╠ ░í┴÷╛╩┤┬░í?
  1290.               ╣░╖╨, ║╬┤π└╠ ╡╚┤┘. ▒╫╖»│¬ ┤▄╝°╟╤ proxy throughput
  1291.               ┐Σ├╗╕╕ ╟╧▒Γ╢º╣«┐í ▒ª┬·┤┘! ╕≡╡τ SSI, CGI, ePerl
  1292.               ╡ε└║ └ⁿ└√└╕╖╬ ┤┘╕Ñ ╝¡╣÷░í ├│╕«╟╤┤┘. └╠░═└╠ ╟┘╜╔└╠┤┘.</div>
  1293.             </li>
  1294.  
  1295.             <li>
  1296.               <strong>╟╧╡σ┐■╛ε/TCP Round-Robin</strong>
  1297.  
  1298.               <p>╟╧╡σ┐■╛ε╕ª ╗τ┐δ╟╤ ╟╪░ß├Ñ╡╡ └╓┤┘. Cisco┤┬ TCP/IP
  1299.               ╝÷┴╪┐í╝¡ ╖╬╡σ╣δ╖▒╜╠└╗ ╟╧┤┬ LocalDirector╢≤┤┬ ▒½╣░└╗
  1300.               ╞╟┤┘. ╜╟┴ª╖╬┤┬ └Ñ╝¡╣÷▒║ ╛╒┤▄┐í └º─í╟╧┤┬ └╧┴╛└╟
  1301.               ╚╕╖╬╝÷┴╪ ░╘└╠╞«┐■└╠┤┘. └┌▒▌└╠ ├µ║╨╟╧░φ ░φ╝║┤╔
  1302.               ╟╪░ß├Ñ└╠ ╟╩┐Σ╟╧┤┘╕Θ └╠░═└╗ ╗τ┐δ╟╧╢≤.</p>
  1303.             </li>
  1304.           </ol>
  1305.         </dd>
  1306.       </dl>
  1307.  
  1308.     
  1309.  
  1310.     <h3>╗⌡╖╬┐ε MIME-type, ╗⌡╖╬┐ε ╝¡║±╜║</h3>
  1311.  
  1312.       
  1313.  
  1314.       <dl>
  1315.         <dt>╗≤╚▓╝│╕φ:</dt>
  1316.  
  1317.         <dd>
  1318.           <p>│╫╞«┐≈┐í┤┬ ╕┌┴° CGI ╟┴╖╬▒╫╖Ñ╡Θ└╠ ╕╣┤┘. ▒╫╖»│¬ ╗τ┐δ╟╧▒Γ
  1319.           ╣°░┼╖»┐÷╝¡ ╕╣└║ └Ñ░ⁿ╕«└┌░í ╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘. ╛╞╞──í└╟
  1320.           MIME-type┐í ╡√╕Ñ Action ╟┌╡Θ╖» ▒Γ┤╔╡╡ CGI ╟┴╖╬▒╫╖Ñ└╠
  1321.           ╞»║░╟╤ URL└╗ (┴ñ╚«╚≈ <code>PATH_INFO</code>┐═
  1322.           <code>QUERY_STRINGS</code>) ╟┴╖╬▒╫╖Ñ└╟ └╘╖┬└╕╖╬ ╗τ┐δ╟╧┴÷
  1323.           ╛╩└╗ ╢º╕╕ └√└²╟╧┤┘. ╕╒└·, ╚«└σ└┌░í (secure CGI╕ª ┴┘┐⌐)
  1324.           <code>.scgi</code>└╬ ╞─└╧└╗ └»╕φ╟╤ <code>cgiwrap</code>
  1325.           ╟┴╖╬▒╫╖Ñ└╕╖╬ ├│╕«╟╧▒Γ└º╟╪ ╗⌡╖╬┐ε type└╗ ╝│┴ñ╟╤┤┘.
  1326.           ╣«┴ª┤┬ (└º┐í╝¡ ║╗) └╧░ⁿ╡╚ URL ▒╕┴╢╕ª ╗τ┐δ╟╧┤┬ ░µ┐∞
  1327.           ╗τ┐δ└┌ ╚¿╡≡╖║┼Σ╕«░í <code>/u/user/foo/bar.scgi</code>░░└║
  1328.           URL└╬ ┴í└╠┤┘. <code>cgiwrap</code>┤┬
  1329.           <code>/~user/foo/bar.scgi/</code> ╟ⁿ╜─└╟ URL└╗
  1330.           ┐°╟╧▒Γ╢º╣«└╠┤┘. ┤┘└╜ ▒╘─ó└╠ ╣«┴ª╕ª ╟╪░ß╟╤┤┘:</p>
  1331.  
  1332. <div class="example"><pre>
  1333. RewriteRule ^/[uge]/<strong>([^/]+)</strong>/\.www/(.+)\.scgi(.*) ...
  1334. ... /internal/cgi/user/cgiwrap/~<strong>$1</strong>/$2.scgi$3  [NS,<strong>T=application/x-http-cgi</strong>]
  1335. </pre></div>
  1336.  
  1337.           <p>└╠┴ª ┤┘╕Ñ ╕┌┴° ╟┴╖╬▒╫╖Ñ, (URL ╟╧└º╞«╕«┐í ┤δ╟╤
  1338.           <code>access.log</code>╕ª ├Γ╖┬╟╧┤┬) <code>wwwlog</code>┐═
  1339.           (URL ╟╧└º╞«╕«┐í Glimpse╕ª ╜╟╟α╟╧┤┬) <code>wwwidx</code>░í
  1340.           └╓┤┘░φ ░í┴ñ╟╧└┌. ┐∞╕«┤┬ ╟┴╖╬▒╫╖Ñ┐í░╘ └█╛≈╟╥ ┤δ╗≤└╬
  1341.           URL ┐╡┐¬└╗ ╛╦╖┴┴α╛▀ ╟╤┤┘. ▒╫╖»│¬ ┐Σ├╗╟╥╢º╕╢┤┘ ╟╫╗≤
  1342.           └√╛ε┴α╛▀ ╟╧▒Γ╢º╣«┐í ▒≥▓√╟╧┴÷ ╛╩┤┘. ┴∩, ║╕┼δ
  1343.           <code>/u/user/foo/</code>┐í ┤δ╟╪ <code>swwidx</code>
  1344.           ╟┴╖╬▒╫╖Ñ└╗ ╜╟╟α╟╤┤┘╕Θ ┤┘└╜░· ░░└║ ╕╡┼⌐╕ª ╗τ┐δ╟╤┤┘</p>
  1345.  
  1346. <div class="example"><pre>
  1347. /internal/cgi/user/swwidx?i=/u/user/foo/
  1348. </pre></div>
  1349.  
  1350.           <p>▒≥▓√╟╧┴÷ ╛╩┤┘. ╕╡┼⌐┐í ┐╡┐¬└╟ └º─í<strong>┐═</strong>
  1351.           CGI └º─í╕ª <strong>╕≡╡╬</strong> └√╛ε╛▀ ╟╧▒Γ╢º╣«└╠┤┘.
  1352.           ┐╡┐¬└╗ └τ▒╕╝║╟╤┤┘╕Θ ┐⌐╖» ╟╧└╠╞█╕╡┼⌐╕ª ╝÷┴ñ╟╧┤┬╡Ñ ╕╣└║
  1353.           ╜├░ú└╠ ░╔╕▒ ░═└╠┤┘.</p>
  1354.         </dd>
  1355.  
  1356.         <dt>╟╪░ß├Ñ:</dt>
  1357.  
  1358.         <dd>
  1359.           <p>╟╪░ß├Ñ└║ └┌╡┐└╕╖╬ └√└²╟╤ CGI╕ª ╜╟╟α╟╧┤┬ ╗⌡╖╬┐ε
  1360.           ╞»║░╟╤ URL ╟ⁿ╜─└╗ ╕╕╡σ┤┬ ░═└╠┤┘. ┤┘└╜░· ░░└╠ ╝│┴ñ╟╤┤┘:</p>
  1361.  
  1362. <div class="example"><pre>
  1363. RewriteRule   ^/([uge])/([^/]+)(/?.*)/\*  /internal/cgi/user/wwwidx?i=/$1/$2$3/
  1364. RewriteRule   ^/([uge])/([^/]+)(/?.*):log /internal/cgi/user/wwwlog?f=/$1/$2$3
  1365. </pre></div>
  1366.  
  1367.           <p>└╠┴ª <code>/u/user/foo/</code>└╗ ░╦╗÷╟╧┤┬ ╕╡┼⌐┤┬
  1368.           ┤┘└╜░· ░░┤┘</p>
  1369.  
  1370. <div class="example"><pre>
  1371. HREF="*"
  1372. /u/user/foo/* (???)
  1373. </pre></div>
  1374.  
  1375.           <p>│╗║╬└√└╕╖╬ ┤┘└╜░· ░░└╠ └┌╡┐║»╚»╡╚┤┘</p>
  1376.  
  1377. <div class="example"><pre>
  1378. /internal/cgi/user/wwwidx?i=/u/user/foo/
  1379. </pre></div>
  1380.  
  1381.           <p>░░└║ ╣µ╣²└╕╖╬ ╕╡┼⌐ ╡┌┐í <code>:log</code>╕ª ╗τ┐δ╟╧┐⌐
  1382.           ┴ó▒┘ ╖╬▒╫ CGI ╟┴╖╬▒╫╖Ñ└╗ ╜╟╟α╟╥ ╝÷ └╓┤┘.</p>
  1383.         </dd>
  1384.       </dl>
  1385.  
  1386.     
  1387.  
  1388.     <h3>┴ñ└√┐í╝¡ ╡┐└√└╕╖╬</h3>
  1389.  
  1390.       
  1391.  
  1392.       <dl>
  1393.         <dt>╗≤╚▓╝│╕φ:</dt>
  1394.  
  1395.         <dd>
  1396.           <p>╛ε╢╗░╘ ║Ω╢≤┐∞└·┐═ ╗τ┐δ└┌░í ╕≡╕ú░╘ └┌┐¼╜║╖┤░╘ ┴ñ└√
  1397.           ╞Σ└╠┴÷ <code>foo.html</code>└╗ ╡┐└√└╬ <code>foo.cgi</code>╖╬
  1398.           ║»░µ╟╥ ╝÷ └╓│¬.</p>
  1399.         </dd>
  1400.  
  1401.         <dt>╟╪░ß├Ñ:</dt>
  1402.  
  1403.         <dd>
  1404.           <p>URL└╗ CGI ╜║┼⌐╕│╞«╖╬ └τ└█╝║╟╧░φ, MIME-type└╗ ╝÷┴ñ╟╧┐⌐
  1405.           CGI ╜║┼⌐╕│╞«╖╬ ╜╟╟α╟╧░╘ ╟╤┤┘. ▒╫╖í╝¡
  1406.           <code>/~quux/foo.html</code>╕ª ┐Σ├╗╟╧╕Θ │╗║╬└√└╕╖╬
  1407.           <code>/~quux/foo.cgi</code>╕ª ╜╟╟α╟╧░╘ ╡╚┤┘.</p>
  1408.  
  1409. <div class="example"><pre>
  1410. RewriteEngine  on
  1411. RewriteBase    /~quux/
  1412. RewriteRule    ^foo\.<strong>html</strong>$  foo.<strong>cgi</strong>  [T=<strong>application/x-httpd-cgi</strong>]
  1413. </pre></div>
  1414.         </dd>
  1415.       </dl>
  1416.  
  1417.     
  1418.  
  1419.     <h3>┴∩╝« ─┴┼┘├≈ └τ╗²╝║</h3>
  1420.  
  1421.       
  1422.  
  1423.       <dl>
  1424.         <dt>╗≤╚▓╝│╕φ:</dt>
  1425.  
  1426.         <dd>
  1427.           <p>└╠ ╣µ╣²└║ ╜╟╖╬ ║±▒Γ└╠┤┘: ╡┐└√└╕╖╬ ╞Σ└╠┴÷╕ª ╗²╝║╟╧┴÷╕╕,
  1428.           ┴ñ└√└╕╖╬ ╞Σ└╠┴÷╕ª ╝¡║±╜║╟╤┤┘. ┴∩, ╞Σ└╠┴÷┤┬ ╝°╝÷╟╧░╘
  1429.           (╞─└╧╜├╜║┼█┐í╝¡ └╨└║ │╗┐δ└╗ ▒╫┤δ╖╬) ┴ñ└√ ╞Σ└╠┴÷╖╬
  1430.           └ⁿ┤▐╡╟┴÷╕╕, ╛°└╗ ░µ┐∞ └Ñ╝¡╣÷░í ╡┐└√└╕╖╬ ╗²╝║╟╤┤┘.
  1431.           ▒╫╖»╕Θ ┤⌐░í (╚ñ└║ cron └█╛≈└╠) ┴ñ└√ ─┴┼┘├≈╕ª ┴÷┐∞┴÷╛╩┤┬
  1432.           ╟╤ CGI░í ╗²╝║╟╤ ╞Σ└╠┴÷╕ª ┴ñ└√└╕╖╬ ╝¡║±╜║╟╤┤┘. ─┴┼┘├≈╕ª
  1433.           ┴÷┐∞╕Θ │╗┐δ└╗ ░╗╜┼╟╤┤┘.</p>
  1434.         </dd>
  1435.  
  1436.         <dt>╟╪░ß├Ñ:</dt>
  1437.  
  1438.         <dd>
  1439.           ┤┘└╜ ▒╘─ó└╗ ╗τ┐δ╟╤┤┘:
  1440.  
  1441. <div class="example"><pre>
  1442. RewriteCond %{REQUEST_FILENAME}   <strong>!-s</strong>
  1443. RewriteRule ^page\.<strong>html</strong>$          page.<strong>cgi</strong>   [T=application/x-httpd-cgi,L]
  1444. </pre></div>
  1445.  
  1446.           <p>┐⌐▒Γ╝¡ <code>page.html</code>╕ª ┐Σ├╗╟╥╢º
  1447.           <code>page.html</code>└╠ ╛°░┼│¬ ╞─└╧┼⌐▒Γ░í 0└╬ ░µ┐∞
  1448.           │╗║╬└√└╕╖╬ <code>page.cgi</code>╕ª ╜╟╟α╟╤┤┘. ┐⌐▒Γ╝¡
  1449.           ║±░ß└║ <code>page.cgi</code>░í └╧╣▌└√└╬ CGI ╜║┼⌐╕│╞«┐═
  1450.           ░░└╠ <code>STDOUT</code>┐í ├Γ╖┬╟╧░φ, ├▀░í╖╬ ├Γ╖┬└╗
  1451.           <code>page.html</code> ╞─└╧┐í └√┤┬┤┘. ╟╤╣° ╜╟╟α╟╤╚─
  1452.           ╝¡╣÷┤┬ <code>page.html</code>└╟ ┴ñ║╕╕ª ║╕│╜┤┘. └Ñ░ⁿ╕«└┌░í
  1453.           ░¡└τ╖╬ │╗┐δ└╗ ░╗╜┼╟╧░φ ╜═┤┘╕Θ, (║╕┼δ cron └█╛≈└╠)
  1454.           <code>page.html</code>└╗ ┴÷┐∞▒Γ╕╕ ╟╧╕Θ ╡╚┤┘.</p>
  1455.         </dd>
  1456.       </dl>
  1457.  
  1458.     
  1459.  
  1460.     <h3>└┌╡┐└╕╖╬ ╗⌡╖╬ ░φ─º╟╧┤┬ ╣«╝¡</h3>
  1461.  
  1462.       
  1463.  
  1464.       <dl>
  1465.         <dt>╗≤╚▓╝│╕φ:</dt>
  1466.  
  1467.         <dd>
  1468.           <p>║╣└Γ╟╤ └Ñ╞Σ└╠┴÷╕ª ╕╕╡Θ╢º ╞φ┴²└┌░í │╗┐δ└╗ ╝÷┴ñ╟╥
  1469.           ╢º╕╢┤┘ └┌╡┐└╕╖╬ ╞Σ└╠┴÷╕ª ╗⌡╖╬ ░φ─º╟╧┤┬ └Ñ║Ω╢≤┐∞└·░í
  1470.           └╓└╕╕Θ ╛≤╕╢│¬ ┴┴└╗▒ε? ║╥░í┤╔╟╤░í?</p>
  1471.         </dd>
  1472.  
  1473.         <dt>╟╪░ß├Ñ:</dt>
  1474.  
  1475.         <dd>
  1476.           <p>░í┤╔╟╧┤┘! MIME multipart ▒Γ┤╔░· └Ñ╝¡╣÷ NPH ▒Γ┤╔,
  1477.           <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>└╟ URL ┴╢└█ ┤╔╖┬└╗ ░ß╟╒╟╧╕Θ
  1478.           ╡╚┤┘. ╕╒└·, ╗⌡╖╬┐ε URL ▒Γ┤╔└╗ ╕╕╡τ┤┘: URL┐í
  1479.           <code>:refresh</code>╕ª ├▀░í╟╧▒Γ╕╕ ╟╧╕Θ ╞─└╧╜├╜║┼█┐í╝¡
  1480.           ╝÷┴ñ╡╔ ╢º╕╢┤┘ ╗⌡╖╬ ░φ─º╟╤┤┘.</p>
  1481.  
  1482. <div class="example"><pre>
  1483. RewriteRule   ^(/[uge]/[^/]+/?.*):refresh  /internal/cgi/apache/nph-refresh?f=$1
  1484. </pre></div>
  1485.  
  1486.           <p>└╠┴ª ┤┘└╜ URL┐í ┴ó▒┘╟╧╕Θ</p>
  1487.  
  1488. <div class="example"><pre>
  1489. /u/foo/bar/page.html:refresh
  1490. </pre></div>
  1491.  
  1492.           <p>┤┘└╜ URL└╗ │╗║╬└√└╕╖╬ ║╬╕Ñ┤┘</p>
  1493.  
  1494. <div class="example"><pre>
  1495. /internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html
  1496. </pre></div>
  1497.  
  1498.           <p>└╠┴ª NPH-CGI ╜║┼⌐╕│╞«╕╕ │▓╛╥┤┘. ║╕┼δ "╡╢└┌┐í░╘
  1499.           ┐¼╜└└╕╖╬ │▓░▄╡╥"└╠╢≤░φ ╕╗╟╧┴÷╕╕ ;-) │¬┤┬ └╠░═╡╡ ┴ª░°╟╤┤┘.</p>
  1500.  
  1501. <div class="example"><pre>
  1502. #!/sw/bin/perl
  1503. ##
  1504. ##  nph-refresh -- NPH/CGI script for auto refreshing pages
  1505. ##  Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
  1506. ##
  1507. $| = 1;
  1508.  
  1509. #   split the QUERY_STRING variable
  1510. @pairs = split(/&/, $ENV{'QUERY_STRING'});
  1511. foreach $pair (@pairs) {
  1512.     ($name, $value) = split(/=/, $pair);
  1513.     $name =~ tr/A-Z/a-z/;
  1514.     $name = 'QS_' . $name;
  1515.     $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
  1516.     eval "\$$name = \"$value\"";
  1517. }
  1518. $QS_s = 1 if ($QS_s eq '');
  1519. $QS_n = 3600 if ($QS_n eq '');
  1520. if ($QS_f eq '') {
  1521.     print "HTTP/1.0 200 OK\n";
  1522.     print "Content-type: text/html\n\n";
  1523.     print "&lt;b&gt;ERROR&lt;/b&gt;: No file given\n";
  1524.     exit(0);
  1525. }
  1526. if (! -f $QS_f) {
  1527.     print "HTTP/1.0 200 OK\n";
  1528.     print "Content-type: text/html\n\n";
  1529.     print "&lt;b&gt;ERROR&lt;/b&gt;: File $QS_f not found\n";
  1530.     exit(0);
  1531. }
  1532.  
  1533. sub print_http_headers_multipart_begin {
  1534.     print "HTTP/1.0 200 OK\n";
  1535.     $bound = "ThisRandomString12345";
  1536.     print "Content-type: multipart/x-mixed-replace;boundary=$bound\n";
  1537.     &print_http_headers_multipart_next;
  1538. }
  1539.  
  1540. sub print_http_headers_multipart_next {
  1541.     print "\n--$bound\n";
  1542. }
  1543.  
  1544. sub print_http_headers_multipart_end {
  1545.     print "\n--$bound--\n";
  1546. }
  1547.  
  1548. sub displayhtml {
  1549.     local($buffer) = @_;
  1550.     $len = length($buffer);
  1551.     print "Content-type: text/html\n";
  1552.     print "Content-length: $len\n\n";
  1553.     print $buffer;
  1554. }
  1555.  
  1556. sub readfile {
  1557.     local($file) = @_;
  1558.     local(*FP, $size, $buffer, $bytes);
  1559.     ($x, $x, $x, $x, $x, $x, $x, $size) = stat($file);
  1560.     $size = sprintf("%d", $size);
  1561.     open(FP, "&lt;$file");
  1562.     $bytes = sysread(FP, $buffer, $size);
  1563.     close(FP);
  1564.     return $buffer;
  1565. }
  1566.  
  1567. $buffer = &readfile($QS_f);
  1568. &print_http_headers_multipart_begin;
  1569. &displayhtml($buffer);
  1570.  
  1571. sub mystat {
  1572.     local($file) = $_[0];
  1573.     local($time);
  1574.  
  1575.     ($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
  1576.     return $mtime;
  1577. }
  1578.  
  1579. $mtimeL = &mystat($QS_f);
  1580. $mtime = $mtime;
  1581. for ($n = 0; $n &lt; $QS_n; $n++) {
  1582.     while (1) {
  1583.         $mtime = &mystat($QS_f);
  1584.         if ($mtime ne $mtimeL) {
  1585.             $mtimeL = $mtime;
  1586.             sleep(2);
  1587.             $buffer = &readfile($QS_f);
  1588.             &print_http_headers_multipart_next;
  1589.             &displayhtml($buffer);
  1590.             sleep(5);
  1591.             $mtimeL = &mystat($QS_f);
  1592.             last;
  1593.         }
  1594.         sleep($QS_s);
  1595.     }
  1596. }
  1597.  
  1598. &print_http_headers_multipart_end;
  1599.  
  1600. exit(0);
  1601.  
  1602. ##EOF##
  1603. </pre></div>
  1604.         </dd>
  1605.       </dl>
  1606.  
  1607.     
  1608.  
  1609.     <h3>┤δ╖«└╟ ░í╗≤╚ú╜║╞«</h3>
  1610.  
  1611.       
  1612.  
  1613.       <dl>
  1614.         <dt>╗≤╚▓╝│╕φ:</dt>
  1615.  
  1616.         <dd>
  1617.           <p>░í╗≤╚ú╜║╞«░í ╕ε░│╕╕ └╓┤┘╕Θ ╛╞╞──í└╟ <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>
  1618.           ▒Γ┤╔└╠ └▀ ╡┐└█╟╤┤┘. ▒╫╖»│¬ ░í╗≤╚ú╜║╞«░í ╝÷╣Θ░│ └╓┤┬
  1619.           ISP╢≤╕Θ └╠ ▒Γ┤╔└╠ ├╓╝▒└║ ╛╞┤╧┤┘.</p>
  1620.         </dd>
  1621.  
  1622.         <dt>╟╪░ß├Ñ:</dt>
  1623.  
  1624.         <dd>
  1625.           <p>└╠ ▒Γ┤╔└╗ ┴ª░°╟╧╖┴╕Θ <dfn>Proxy Throughput</dfn>
  1626.           ▒Γ┤╔└╗ (╟├╖í▒╫ <code>[P]</code>) ╗τ┐δ╟╧┐⌐ ┐▄║╬ └Ñ╞Σ└╠┴÷
  1627.           ╚ñ└║ └ⁿ├╝ ┐▄║╬ └Ñ┐╡┐¬└╗ ┐∞╕«└╟ └╠╕º░°░ú┐í ┤δ└└╟╤┤┘:</p>
  1628.  
  1629. <div class="example"><pre>
  1630. ##
  1631. ##  vhost.map
  1632. ##
  1633. www.vhost1.dom:80  /path/to/docroot/vhost1
  1634. www.vhost2.dom:80  /path/to/docroot/vhost2
  1635.      :
  1636. www.vhostN.dom:80  /path/to/docroot/vhostN
  1637. </pre></div>
  1638.  
  1639. <div class="example"><pre>
  1640. ##
  1641. ##  httpd.conf
  1642. ##
  1643.     :
  1644. #   ╕«┤┘└╠╖║╞«╟╥╢º ┴ñ▒╘ ╚ú╜║╞«╕φ└╗ ╗τ┐δ╟╤┤┘.
  1645. UseCanonicalName on
  1646.  
  1647.     :
  1648. #   ░í╗≤╚ú╜║╞«╕ª CLF ╟ⁿ╜─ ╛╒┐í ├▀░í╟╤┤┘
  1649. CustomLog  /path/to/access_log  "%{VHOST}e %h %l %u %t \"%r\" %>s %b"
  1650.     :
  1651.  
  1652. #   ┴╓╝¡╣÷┐í╝¡ └τ└█╝║ ┐ú┴°└╗ ╗τ┐δ╟╤┤┘
  1653. RewriteEngine on
  1654.  
  1655. #   ╡╬ ╕╩└╗ ┴ñ└╟╟╤┤┘: ╟╧│¬┤┬ URL└╗ ░φ─í░φ,
  1656. #   ┤┘╕Ñ ╟╧│¬┤┬ ░í╗≤╚ú╜║╞«║░ DocumentRoot╕ª
  1657. #   ┴ñ└╟╟╤┤┘.
  1658. RewriteMap    lowercase    int:tolower
  1659. RewriteMap    vhost        txt:/path/to/vhost.map
  1660.  
  1661. #   └╠┴ª ┼⌐░φ ║╣└Γ╟╤ ▒╘─ó ╟╤░│╕ª ╗τ┐δ╟╧┐⌐
  1662. #   ░í╗≤╚ú╜║╞«╖╬ ┤δ└└╟╤┤┘.
  1663. #
  1664. #   1. ░í╗≤╚ú╜║╞«╡Θ└╠ ░░└╠ ╗τ┐δ╟╧┤┬ └º─í┤┬ ┤δ└└╟╧┴÷ ╛╩┤┬┤┘
  1665. RewriteCond   %{REQUEST_URL}  !^/commonurl1/.*
  1666. RewriteCond   %{REQUEST_URL}  !^/commonurl2/.*
  1667.     :
  1668. RewriteCond   %{REQUEST_URL}  !^/commonurlN/.*
  1669. #
  1670. #   2. ┐∞╕«░í ╟÷└τ ╗τ┐δ╟╧┤┬ ╣µ╣²└╠ Host ╟∞┤⌡╕ª
  1671. #      ░í╗≤╚ú╜║╞«╕ª ┴÷┐°╟╧╣╟╖╬
  1672. #      Host ╟∞┤⌡░í └╓┤┬┴÷ ╚«└╬╟╤┤┘
  1673. RewriteCond   %{HTTP_HOST}  !^$
  1674. #
  1675. #   3. ╚ú╜║╞«╕φ└╗ ╝╥╣«└┌╖╬ ╕╕╡τ┤┘
  1676. RewriteCond   ${lowercase:%{HTTP_HOST}|NONE}  ^(.+)$
  1677. #
  1678. #   4. vhost.map┐í╝¡ ╚ú╜║╞«╕φ└╗ ├ú░φ
  1679. #      ░µ╖╬└╧╢º╕╕ ▒Γ╛∩╟╤┤┘
  1680. #      (└º┐í╝¡ "NONE"└║ ╛╞┤╧┤┘)
  1681. RewriteCond   ${vhost:%1}  ^(/.*)$
  1682. #
  1683. #   5. ╕╢┴÷╕╖└╕╖╬ URL└╗ ╣«╝¡ └º─í╖╬ ┤δ└└╟╧░φ
  1684. #      ╖╬▒╫┐í │▓▒Γ▒Γ└º╟╪ ░í╗≤╚ú╜║╞«╕ª ▒Γ╛∩╟╪ ╡╨┤┘
  1685. RewriteRule   ^/(.*)$   %1/$1  [E=VHOST:${lowercase:%{HTTP_HOST}}]
  1686.     :
  1687. </pre></div>
  1688.         </dd>
  1689.       </dl>
  1690.  
  1691.     
  1692.  
  1693.   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1694. <div class="section">
  1695. <h2><a name="access" id="access">┴ó▒┘ ┴ª╟╤</a></h2>
  1696.  
  1697.     
  1698.  
  1699.     <h3>╖╬║┐ ╕╖▒Γ</h3>
  1700.  
  1701.       
  1702.  
  1703.       <dl>
  1704.         <dt>╗≤╚▓╝│╕φ:</dt>
  1705.  
  1706.         <dd>
  1707.           <p>╛ε╢╗░╘ ╟╧╕Θ ╞»┴ñ └Ñ░°░ú└╟ ╞Σ└╠┴÷╕ª ▒▄╛ε╕≡└╕┤┬ ▒═┬·└║
  1708.           ╖╬║┐└╗ ╕╖└╗ ╝÷ └╓│¬? "Robot Exclusion Protocol" ╟╫╕±└╗
  1709.           └·└σ╟╤ <code>/robots.txt</code> ╞─└╧└║ ║╕┼δ └╠╖▒ ╖╬║┐└╗
  1710.           ╕╖┤┬╡Ñ ├µ║╨╟╧┴÷ ╛╩┤┘.</p>
  1711.         </dd>
  1712.  
  1713.         <dt>╟╪░ß├Ñ:</dt>
  1714.  
  1715.         <dd>
  1716.           <p>(╛╞╕╢╡╡ ╡≡╖║┼Σ╕«░í ▒φ╛ε╝¡ ╖╬║┐└╠ ╡╣╛╞┤┘┤╧╕Θ ╝¡╣÷┐í
  1717.           ║╬┤π└╠ ┼½ ░µ┐∞) └Ñ░°░ú <code>/~quux/foo/arc/</code>┐í
  1718.           └╓┤┬ URL╡Θ└╗ ░┼║╬╟╧┤┬ ▒╘─ó└╗ ╗τ┐δ╟╤┤┘. ┐∞╕«┤┬ ╞»┴ñ
  1719.           ╖╬║┐└╟ ┴ó▒┘└╗ ╕╖╛╞╛▀ ╟╤┤┘. ┴∩, ╖╬║┐└╗ ╜╟╟α╟╧┤┬ ╚ú╜║╞«╕ª
  1720.           ╕╖┤┬ ░═└╕╖╬┤┬ ║╥├µ║╨╟╧╕τ, ▒╫ ╚ú╜║╞«└╟ ╗τ┐δ└┌╡╡ ╕╖╛╞╣÷╕«░╘
  1721.           ╡╚┤┘. User-Agent HTTP ╟∞┤⌡ ┴ñ║╕╡╡ ║±▒│╟╤┤┘.</p>
  1722.  
  1723. <div class="example"><pre>
  1724. RewriteCond %{HTTP_USER_AGENT}   ^<strong>NameOfBadRobot</strong>.*
  1725. RewriteCond %{REMOTE_ADDR}       ^<strong>123\.45\.67\.[8-9]</strong>$
  1726. RewriteRule ^<strong>/~quux/foo/arc/</strong>.+   -   [<strong>F</strong>]
  1727. </pre></div>
  1728.         </dd>
  1729.       </dl>
  1730.  
  1731.     
  1732.  
  1733.     <h3>▒╫╕▓ ╞█░í▒Γ ╣µ┴÷</h3>
  1734.  
  1735.       
  1736.  
  1737.       <dl>
  1738.         <dt>╗≤╚▓╝│╕φ:</dt>
  1739.  
  1740.         <dd>
  1741.           <p><code>http://www.quux-corp.de/~quux/</code>┐í └╓┤┬
  1742.           ╞Σ└╠┴÷╡Θ└╠ GIF ▒╫╕▓└╗ ╞≈╟╘╟╤┤┘░φ ░í┴ñ╟╧└┌. └╠ ▒╫╕▓└╠
  1743.           ╕┌└╓╛ε╝¡, ┤┘╕Ñ ╗τ╢≈╡Θ└╠ └┌╜┼└╟ ╞Σ└╠┴÷┐í ┴≈┴ó ╕╡┼⌐╕ª
  1744.           ░╟┤┘. ╝¡╣÷┐í ║╥╟╩┐Σ╟╤ ║╬┤π└╠ ╡╟╣╟╖╬ ╕╖░φ ╜═┤┘.</p>
  1745.         </dd>
  1746.  
  1747.         <dt>╟╪░ß├Ñ:</dt>
  1748.  
  1749.         <dd>
  1750.           <p>▒╫╕▓└╗ 100% ║╕╚ú╟╥ ╝÷┤┬ ╛°┴÷╕╕, ├╓╝╥╟╤ ║Ω╢≤┐∞└·░í
  1751.           HTTP Referer ╟∞┤⌡╕ª ║╕│╗┤┬ ░µ┐∞ ┴ª╟╤╟╥ ╝÷ └╓┤┘.</p>
  1752.  
  1753. <div class="example"><pre>
  1754. RewriteCond %{HTTP_REFERER} <strong>!^$</strong>
  1755. RewriteCond %{HTTP_REFERER} !^http://www.quux-corp.de/~quux/.*$ [NC]
  1756. RewriteRule <strong>.*\.gif$</strong>        -                                    [F]
  1757. </pre></div>
  1758.  
  1759. <div class="example"><pre>
  1760. RewriteCond %{HTTP_REFERER}         !^$
  1761. RewriteCond %{HTTP_REFERER}         !.*/foo-with-gif\.html$
  1762. RewriteRule <strong>^inlined-in-foo\.gif$</strong>   -                        [F]
  1763. </pre></div>
  1764.         </dd>
  1765.       </dl>
  1766.  
  1767.     
  1768.  
  1769.     <h3>╚ú╜║╞« ░┼║╬</h3>
  1770.  
  1771.       
  1772.  
  1773.       <dl>
  1774.         <dt>╗≤╚▓╝│╕φ:</dt>
  1775.  
  1776.         <dd>
  1777.           <p>╛ε╢╗░╘ ┐▄║╬┐í╝¡ ╝¡╣÷┐í ┴ó▒┘╟╥ ╝÷ ╛°┤┬ ╚ú╜║╞« ╕±╖╧└╗
  1778.           ╝│┴ñ╟╥ ╝÷ └╓│¬?</p>
  1779.         </dd>
  1780.  
  1781.         <dt>╟╪░ß├Ñ:</dt>
  1782.  
  1783.         <dd>
  1784.           <p>╛╞╞──í >= 1.3b6┐í╝¡:</p>
  1785.  
  1786. <div class="example"><pre>
  1787. RewriteEngine on
  1788. RewriteMap    hosts-deny  txt:/path/to/hosts.deny
  1789. RewriteCond   ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND} !=NOT-FOUND [OR]
  1790. RewriteCond   ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND} !=NOT-FOUND
  1791. RewriteRule   ^/.*  -  [F]
  1792. </pre></div>
  1793.  
  1794.           <p>╛╞╞──í <= 1.3b6┐í╝¡:</p>
  1795.  
  1796. <div class="example"><pre>
  1797. RewriteEngine on
  1798. RewriteMap    hosts-deny  txt:/path/to/hosts.deny
  1799. RewriteRule   ^/(.*)$ ${hosts-deny:%{REMOTE_HOST}|NOT-FOUND}/$1
  1800. RewriteRule   !^NOT-FOUND/.* - [F]
  1801. RewriteRule   ^NOT-FOUND/(.*)$ ${hosts-deny:%{REMOTE_ADDR}|NOT-FOUND}/$1
  1802. RewriteRule   !^NOT-FOUND/.* - [F]
  1803. RewriteRule   ^NOT-FOUND/(.*)$ /$1
  1804. </pre></div>
  1805.  
  1806. <div class="example"><pre>
  1807. ##
  1808. ##  hosts.deny
  1809. ##
  1810. ##  ┴╓└╟! └╠░═└║ ╕±╖╧├│╖│ ║╕└╠┴÷╕╕ ╕±╖╧└╠ ╛╞┤╧╢≤ ╕╩└╠┤┘.
  1811. ##        mod_rewrite┤┬ └╠ ┴ñ║╕╕ª ┼░/░¬ ╜╓└╕╖╬ ╟╪╝«╟╧▒Γ╢º╣«┐í,
  1812. ##        ░ó ╟╫╕±└╟ ░¬ └┌╕«┐í ├╓╝╥╟╤ "-"░í ╟╩┐Σ╟╧┤┘.
  1813. ##
  1814.  
  1815. 193.102.180.41 -
  1816. bsdti1.sdm.de  -
  1817. 192.76.162.40  -
  1818. </pre></div>
  1819.         </dd>
  1820.       </dl>
  1821.  
  1822.     
  1823.  
  1824.     <h3>╟┴╖╧╜├ ░┼║╬</h3>
  1825.  
  1826.       
  1827.  
  1828.       <dl>
  1829.         <dt>╗≤╚▓╝│╕φ:</dt>
  1830.  
  1831.         <dd>
  1832.           <p>╛ε╢╗░╘ ╞»┴ñ ╚ú╜║╞« ╚ñ└║ ╞»┴ñ ╚ú╜║╞«└╟ ╗τ┐δ└┌░í
  1833.           ╛╞╞──í ╟┴╖╧╜├╕ª ╗τ┐δ╟╥ ╝÷ ╛°╡╡╖╧ ╟╧│¬?</p>
  1834.         </dd>
  1835.  
  1836.         <dt>╟╪░ß├Ñ:</dt>
  1837.  
  1838.         <dd>
  1839.           <p>╕╒└· ╛╞╞──í └Ñ╝¡╣÷╕ª ──╞─└╧╟╥╢º ▒╕╝║╞─└╧┐í╝¡
  1840.           <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>░í <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>
  1841.           ╛╞╖í┐í(!) └╓╛ε╛▀ ╟╤┤┘. ▒╫╖»╕Θ <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>┤┬
  1842.           <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> <em>└╠└ⁿ┐í</em> ║╥╕░┤┘.
  1843.           └╠┴ª ┤┘└╜░· ░░└╠ ╞»┴ñ ╚ú╜║╞«╕ª ░┼║╬╟╧╡╡╖╧ ╝│┴ñ╟╤┤┘...</p>
  1844.  
  1845. <div class="example"><pre>
  1846. RewriteCond %{REMOTE_HOST} <strong>^badhost\.mydomain\.com$</strong>
  1847. RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
  1848. </pre></div>
  1849.  
  1850.           <p>...▒╫╕«░φ ┤┘└╜└║ user@host┐í ╡√╢≤ ░┼║╬╟╤┤┘:</p>
  1851.  
  1852. <div class="example"><pre>
  1853. RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST}  <strong>^badguy@badhost\.mydomain\.com$</strong>
  1854. RewriteRule !^http://[^/.]\.mydomain.com.*  - [F]
  1855. </pre></div>
  1856.         </dd>
  1857.       </dl>
  1858.  
  1859.     
  1860.  
  1861.     <h3>╞»║░╟╤ └╬┴⌡ ╣µ╜─</h3>
  1862.  
  1863.       
  1864.  
  1865.       <dl>
  1866.         <dt>╗≤╚░╝│╕φ:</dt>
  1867.  
  1868.         <dd>
  1869.           <p>░í▓√ ╕┼┐∞ ╞»║░╟╤ └╬┴⌡└╠ ╟╩┐Σ╟╥ ╢º░í └╓┤┘. ┐╣╕ª
  1870.           ╡Θ╛ε, ╣╠╕« ╝│┴ñ╟╪╡╨ ╗τ┐δ└┌└╬┴÷ ░╦╗τ╟╤┤┘. └╠╡Θ┐í░╘╕╕
  1871.           (<code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code>└╟ Basic Auth╕ª ╗τ┐δ╟╤
  1872.           ░µ┐∞┐═ ┤▐╕«) ║░┤┘╕Ñ ╣░└╜╛°└╠ ┴ó▒┘└╗ ╟π┐δ╟╤┤┘.</p>
  1873.         </dd>
  1874.  
  1875.         <dt>╟╪░ß├Ñ:</dt>
  1876.  
  1877.         <dd>
  1878.           <p>─ú▒╕╕╕ ┴ó▒┘└╠ ░í┤╔╟╧╡╡╖╧ └τ└█╝║ ▒╘─ó╡Θ└╗ ╗τ┐δ╟╤┤┘:</p>
  1879.  
  1880. <div class="example"><pre>
  1881. RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>!^friend1@client1.quux-corp\.com$</strong>
  1882. RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>!^friend2</strong>@client2.quux-corp\.com$
  1883. RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>!^friend3</strong>@client3.quux-corp\.com$
  1884. RewriteRule ^/~quux/only-for-friends/      -                                 [F]
  1885. </pre></div>
  1886.         </dd>
  1887.       </dl>
  1888.  
  1889.     
  1890.  
  1891.     <h3>Referer▒Γ╣▌ ║»╚»▒Γ(deflector)</h3>
  1892.  
  1893.       
  1894.  
  1895.       <dl>
  1896.         <dt>╗≤╚▓╝│╕φ:</dt>
  1897.  
  1898.         <dd>
  1899.           <p>"Referer" HTTP ╟∞┤⌡┐í ╡√╢≤ ┐°╟╧┤┬┤δ╖╬ ┬ⁿ┴╢╞Σ└╠┴÷╕ª
  1900.           ╝│┴ñ╟╥ ╝÷ └╓┤┬ └»┐¼╟╤ URL ║»╚»▒Γ╕ª ╕╕╡Θ ╝÷ └╓┤┬░í?</p>
  1901.         </dd>
  1902.  
  1903.         <dt>╟╪░ß├Ñ:</dt>
  1904.  
  1905.         <dd>
  1906.           <p>┤┘└╜░· ░░└╠ ║╣└Γ╟╤ ▒╘─ó└╗...</p>
  1907.  
  1908. <div class="example"><pre>
  1909. RewriteMap  deflector txt:/path/to/deflector.map
  1910.  
  1911. RewriteCond %{HTTP_REFERER} !=""
  1912. RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
  1913. RewriteRule ^.* %{HTTP_REFERER} [R,L]
  1914.  
  1915. RewriteCond %{HTTP_REFERER} !=""
  1916. RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
  1917. RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
  1918. </pre></div>
  1919.  
  1920.           <p>... └τ└█╝║ ╕╩░· ░░└╠ ╗τ┐δ╟╤┤┘:</p>
  1921.  
  1922. <div class="example"><pre>
  1923. ##
  1924. ##  deflector.map
  1925. ##
  1926.  
  1927. http://www.badguys.com/bad/index.html    -
  1928. http://www.badguys.com/bad/index2.html   -
  1929. http://www.badguys.com/bad/index3.html   http://somewhere.com/
  1930. </pre></div>
  1931.  
  1932.           <p>▒╫╖»╕Θ ┐Σ├╗└╗ └┌╡┐└╕╖╬ (╕╩┐í╝¡ ░¬└╕╖╬ "<code>-</code>"╕ª
  1933.           ╗τ┐δ╟╤ ░µ┐∞) ┬ⁿ┴╢╞Σ└╠┴÷│¬ (URL└╠ ╕╩┐í └╓┤┬ ░µ┐∞ ╡╬╣°┬░
  1934.           ╛╞▒╘╕╒╞«╖╬) ╞»┴ñ URL╖╬ ╕«┤┘└╠╖║╝╟╟╤┤┘.</p>
  1935.         </dd>
  1936.       </dl>
  1937.  
  1938.     
  1939.  
  1940.   </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
  1941. <div class="section">
  1942. <h2><a name="other" id="other">▒Γ┼╕</a></h2>
  1943.  
  1944.     
  1945.  
  1946.     <h3>┐▄║╬ └τ└█╝║ ┐ú┴°</h3>
  1947.  
  1948.       
  1949.  
  1950.       <dl>
  1951.         <dt>╗≤╚▓╝│╕φ:</dt>
  1952.  
  1953.         <dd>
  1954.           <p>FAQ: ╛ε╢╗░╘ └╠╖▒└·╖▒ └Γ┤┘╟╤ ╣«┴ª╕ª ╟« ╝÷ └╓┤┬░í?
  1955.           <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>╖╬┤┬ ╟╪░ß├Ñ└╠ ╛╚║╕└╬┤┘...</p>
  1956.         </dd>
  1957.  
  1958.         <dt>╟╪░ß├Ñ:</dt>
  1959.  
  1960.         <dd>
  1961.           <p>┐▄║╬ <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code>└╗ ╗τ┐δ╟╧╢≤.
  1962.           ┴∩, ╟┴╖╬▒╫╖Ñ└╠ <code class="directive"><a href="../mod/mod_rewrite.html#rewritemap">RewriteMap</a></code> ┐¬╟╥└╗
  1963.           ╟╤┤┘. ╟┴╖╬▒╫╖Ñ└║ ╛╞╞──í░í ╜├└█╟╥╢º ╜├└█╟╧┐⌐
  1964.           <code>STDIN</code>┐í╝¡ ┐Σ├╗╟╤ URL└╗ ╣▐░φ, (░░└║ ╝°╝¡╖╬!)
  1965.           ░ß░· (║╕┼δ └τ└█╝║╡╚) URL└╗ <code>STDOUT</code>┐í ├Γ╖┬╟╤┤┘.</p>
  1966.  
  1967. <div class="example"><pre>
  1968. RewriteEngine on
  1969. RewriteMap    quux-map       <strong>prg:</strong>/path/to/map.quux.pl
  1970. RewriteRule   ^/~quux/(.*)$  /~quux/<strong>${quux-map:$1}</strong>
  1971. </pre></div>
  1972.  
  1973. <div class="example"><pre>
  1974. #!/path/to/perl
  1975.  
  1976. #   ╛╞╞──í ╝¡╣÷░í ╕╪├▀┴÷ ╛╩╡╡╖╧
  1977. #   └╘├Γ╖┬ ╣÷╞█╕ª ╗τ┐δ╟╧┴÷ ╛╩┤┬┤┘
  1978. $| = 1;
  1979.  
  1980. #   stdin┐í╝¡ ╟╤┴┘╛┐ URL└╗ └╨░φ
  1981. #   stdout┐í ║»╚»╟╤ URL└╗ ├Γ╖┬╟╤┤┘
  1982. while (<>) {
  1983.     s|^foo/|bar/|;
  1984.     print $_;
  1985. }
  1986. </pre></div>
  1987.  
  1988.           <p>╝│╕φ╟╧▒Γ└º╟╪ ╕≡╡τ <code>/~quux/foo/...</code> URL└╗
  1989.           <code>/~quux/bar/...</code>╖╬ └τ└█╝║╟╧┤┬ ╜║┼⌐╕│╞«╕ª
  1990.           ┐╣╖╬ ╡Θ╛·┤┘. ╜╟┴ª╖╬ ╕╢└╜┤δ╖╬ ╟┴╖╬▒╫╖í╣╓╟╥ ╝÷ └╓┤┘.
  1991.           ▒╫╖»│¬ └╧╣▌ ╗τ┐δ└┌░í └╠╖▒ ╕╩└╗ <strong>╗τ┐δ╟╥</strong>
  1992.           ╝÷ └╓┤┘░φ ╟╧┤⌡╢≤░φ, ┐└┴≈ ╜├╜║┼█ ░ⁿ╕«└┌╕╕└╠ ╕╩└╗
  1993.           <strong>┴ñ└╟╟╪╛▀</strong> ╟╘└╗ ┴╓└╟╟╧╢≤.</p>
  1994.         </dd>
  1995.       </dl>
  1996.  
  1997.     
  1998.  
  1999.   </div></div>
  2000. <div class="bottomlang">
  2001. <p><span>░í┤╔╟╤ ╛≡╛ε: </span><a href="../en/misc/rewriteguide.html" hreflang="en" rel="alternate" title="English"> en </a> |
  2002. <a href="../ko/misc/rewriteguide.html" title="Korean"> ko </a></p>
  2003. </div><div id="footer">
  2004. <p class="apache">Copyright 2007 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
  2005. <p class="menu"><a href="../mod/">╕≡╡Γ</a> | <a href="../mod/directives.html">┴÷╜├╛ε╡Θ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">┐δ╛ε</a> | <a href="../sitemap.html">╗τ└╠╞«╕╩</a></p></div>
  2006. </body></html>