~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to docs/manual/misc/rewriteguide.html.ko.euc-kr

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
 
18
<div id="path">
 
19
<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.2</a> &gt; <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">&nbsp;en&nbsp;</a> |
 
22
<a href="../ko/misc/rewriteguide.html" title="Korean">&nbsp;ko&nbsp;</a></p>
 
23
</div>
 
24
<div class="outofdate">�� ������ �ֽ��� ������ �ƴմϴ�.
 
25
            �ֱٿ� ����� ������ ���� ������ �����ϼ���.</div>
 
26
 
 
27
    <div class="note">
 
28
      <p>������<br />
 
29
      <cite>Ralf S. Engelschall &lt;rse@apache.org&gt;</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 "&lt;html&gt;\n";
 
782
print "&lt;head&gt;\n";
 
783
print "&lt;title&gt;302 Moved Temporarily (EXTENDED)&lt;/title&gt;\n";
 
784
print "&lt;/head&gt;\n";
 
785
print "&lt;body&gt;\n";
 
786
print "&lt;h1&gt;Moved Temporarily (EXTENDED)&lt;/h1&gt;\n";
 
787
print "The document has moved &lt;a HREF=\"$url\"&gt;here&lt;/a&gt;.&lt;p&gt;\n";
 
788
print "&lt;/body&gt;\n";
 
789
print "&lt;/html&gt;\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>&lt;STRING</code>, <code>&gt;STRING</code>,
 
881
          <code>=STRING</code>�� ����Ͽ� �ð��� ���� �����̷�����
 
882
          �� �ִ�:</p>
 
883
 
 
884
<div class="example"><pre>
 
885
RewriteEngine on
 
886
RewriteCond   %{TIME_HOUR}%{TIME_MIN} &gt;0700
 
887
RewriteCond   %{TIME_HOUR}%{TIME_MIN} &lt;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 &gt;1024 --&gt; Host www2.quux-corp.dom Port <strong>80</strong>
 
1146
<strong>DENY</strong>  Host *                 Port *     --&gt; 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
              �˻� ����� ��Ʈ���� �ٸ� ���Ӽ����� ij���ǿ�
 
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 (&lt;STDIN&gt;) {
 
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>�N ������ �����</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(/&amp;/, $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 "&amp;lt;b&amp;gt;ERROR&amp;lt;/b&amp;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 "&amp;lt;b&amp;gt;ERROR&amp;lt;/b&amp;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
    &amp;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, "&amp;lt;$file");
 
1562
    $bytes = sysread(FP, $buffer, $size);
 
1563
    close(FP);
 
1564
    return $buffer;
 
1565
}
 
1566
 
 
1567
$buffer = &amp;readfile($QS_f);
 
1568
&amp;print_http_headers_multipart_begin;
 
1569
&amp;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 = &amp;mystat($QS_f);
 
1580
$mtime = $mtime;
 
1581
for ($n = 0; $n &amp;lt; $QS_n; $n++) {
 
1582
    while (1) {
 
1583
        $mtime = &amp;mystat($QS_f);
 
1584
        if ($mtime ne $mtimeL) {
 
1585
            $mtimeL = $mtime;
 
1586
            sleep(2);
 
1587
            $buffer = &amp;readfile($QS_f);
 
1588
            &amp;print_http_headers_multipart_next;
 
1589
            &amp;displayhtml($buffer);
 
1590
            sleep(5);
 
1591
            $mtimeL = &amp;mystat($QS_f);
 
1592
            last;
 
1593
        }
 
1594
        sleep($QS_s);
 
1595
    }
 
1596
}
 
1597
 
 
1598
&amp;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">&lt;VirtualHost&gt;</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\" %&gt;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>����ġ &gt;= 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>����ġ &lt;= 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 (&lt;&gt;) {
 
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">&nbsp;en&nbsp;</a> |
 
2002
<a href="../ko/misc/rewriteguide.html" title="Korean">&nbsp;ko&nbsp;</a></p>
 
2003
</div><div id="footer">
 
2004
<p class="apache">Copyright 2006 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>
 
 
b'\\ No newline at end of file'