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
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>
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>
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>
24
<div class="outofdate">�� ������ �ֽ��� ������ �ƴմϴ�.
25
�ֱٿ� ����� ������ ���� ������ �����ϼ���.</div>
29
<cite>Ralf S. Engelschall <rse@apache.org></cite><br />
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>
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>
47
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
49
<h2><a name="ToC1" id="ToC1"><code>mod_rewrite</code> �Ұ�</a></h2>
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>
61
<p>�ٸ� ����: <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>�� ���� �����
62
ó���� ���� �� ����� �ٽ� ������� �ʰų�, �����Կ� �ŷ�Ǿ�
63
������ �� ���� ����� ���� ���̴�. �� ���� ù��° ��츦
64
�������� �̹� �˷��� ��� ������ʸ� �Ұ��Ϸ��� �Ѵ�.</p>
66
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
68
<h2><a name="ToC2" id="ToC2">�ǿ����� �ذ�å</a></h2>
72
<p>���� ���� ���� ������ų� �ٸ� ������� ���� ���� �ǿ�����
73
�ذ�å�� ���´�. �������� URL ���ۼ��� �渶���� ������ ����
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
�� ��Ģ�� � ����� �ϴ��� �����ϵ��� �ض�. ���� ������
85
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
87
<h2><a name="url" id="url">URL ����</a></h2>
91
<h3>������ �Ǵ� URL</h3>
99
<p>�� ���ҽ��� ���� ���� URL�� ������ �������� �ִ�.
100
���� (���� ����ϰ� �˷����� ��) ������ �Ǵ� URL��,
101
���� Ȥ�� ���� �뵵�� URL�� �ִ�. ����ڰ� ��û��
102
� URL�� ����ϴ��� ������ �Ǵ� URL���� �������
109
<p>������ �����ʴ� ��� URL�� �������� �˵��� ��ġ������
110
�ܺ� HTTP �����̷����Ѵ�. ���� ��� �Ʒ� ��Ģ��
111
<code>/~user</code>�� ������ �Ǵ� <code>/u/user</code>��
112
��ü�ϰ�, <code>/u/user</code> �������� �������� ���ٸ�
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>]
124
<h3>������ �Ǵ� ȣ��Ʈ��</h3>
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]
150
<h3><code>DocumentRoot</code>�� �ű� ���</h3>
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>
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>�� ����ϸ�
182
<div class="example"><pre>
184
RewriteRule <strong>^/$</strong> /e/www/ [<strong>R</strong>]
191
<h3>������ ������ ����</h3>
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 ���ۼ��� �� �Ŀ�
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>
223
<p>���� �̸� �ذ��ϱ����� ������ ���� �����Ѵ�:</p>
225
<div class="example"><pre>
228
RewriteRule ^foo<strong>$</strong> foo<strong>/</strong> [<strong>R</strong>]
231
<p>Ȩ���丮�� �ֻ��� <code>.htaccess</code> ���Ͽ�
232
������ ���� ������ ���� �ִ�. ���� ó���ϴµ� �δ���
235
<div class="example"><pre>
238
RewriteCond %{REQUEST_FILENAME} <strong>-d</strong>
239
RewriteRule ^(.+<strong>[^/]</strong>)$ $1<strong>/</strong> [R]
246
<h3>�ϰ��� URL ������ ���� ��Ŭ������</h3>
254
<p>��Ʈ��� ���������� ��� �������� �����ϰ� �ϰ���
255
URL ������ ����� �ʹ�. ��, ��� (���ǻ� ������ ���Ͽ�
256
������ ��������!) URL�� ���� <em>����������</em> �����!
257
�� �̸������� ������������ ������ ������ �ο��ؾ� �Ѵ�:
258
URL�� ���� ������ ��Ī�ϸ� �ȵȴ�. �������� �ڵ�����
259
���� ������ �����Ѵ�.</p>
265
<p>���� �����, ��, ����ü�� ��ġ ������ ������
266
(�л��) �ܺθʿ� ���� ���� ������ ���´�. �ܺθ���
267
������ ���� �����̴�</p>
269
<div class="example"><pre>
270
user1 server_of_user1
271
user2 server_of_user2
275
<p>�츮�� �� ������ ���� <code>map.xxx-to-host</code>
276
���Ͽ� �����ߴ�. �������� ��� �������� URL�� ������
277
���ٸ� ������ ���� URL��,</p>
279
<div class="example"><pre>
285
<p>������ ���� �����̷����Ѵ�</p>
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
293
<p>�Ʒ� ��Ģ�� �������� ����Ͽ� �� �۾��� �Ѵ� (server0��
294
�ʿ� ���� ���� ��� ����� �⺻������� �����Ѵ�):</p>
296
<div class="example"><pre>
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
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
307
RewriteRule ^/([uge])/([^/]+)/?$ /$1/$2/.www/
308
RewriteRule ^/([uge])/([^/]+)/([^.]+.+) /$1/$2/.www/$3\
315
<h3>Ȩ���丮�� �ٸ� �������� ����</h3>
323
<p>���� �������ڴ� �������� ��� Ȩ���丮�� �ٸ�
324
�������� ������ ��� �ذ�å�� �����. �� �����
325
���� ������ ��ü�� ���ο� ������ �����ϴµ� �ð���
326
�ɸ��� ��쿡 �ʿ��ϴ�.</p>
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>
337
<div class="example"><pre>
339
RewriteRule ^/~(.+) http://<strong>newserver</strong>/~$1 [R,L]
346
<h3>Ȩ���丮 ���� �����</h3>
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>
366
<p>����ǥ�ð� �ִ� URL�� ���� ���� ������ ��ȯ�ϱ�����
367
���� ��Ģ�� ����Ѵ�.</p>
369
<div class="example"><pre>
371
RewriteRule ^/~(<strong>([a-z])</strong>[a-z0-9]+)(.*) /home/<strong>$2</strong>/$1/.www$3
378
<h3>���Ͻý��� �籸��</h3>
386
<p>�� ���� �Ƿ� �ϵ��ھ����̴�: ���丮��
387
<code>RewriteRules</code>�� �ſ� ���� ����Ͽ� �ڷ�
388
��ü�� �״�� ��ü�� ���� �ڷḦ �ڿ������� ����¡�ϵ���
389
�Ѵ�. ���: ���� 1992�� ���� �����Ӱ� ����� �� �ִ�
390
���н� ����Ʈ������� <strong><em>net.sw</em></strong>��
391
��Ƶΰ� �־���. �̴� ���� ��ǻ�Ͱ����� �����ϸ鼭
392
�����ص��� �����ð��� �ý��� �����ڿ� ��Ʈ�� �����ڸ�
393
�ؿԱ���� �� ������� ���̴�. ���ָ��� ���� ����Ʈ���
394
�߰��� ������ ���丮�� ���� �����Դ�:</p>
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/
415
<p>1996�� 7�� �� ����Ҹ� ���ִ� �� �������̽��� ����
416
���� �����ϱ�� ������. "���ִ�"�� ����, �ֻ���
417
���丮�� CGI ��ũ��Ʈ�� ���� �ʰ���, ����� ����������
418
���� �������ϱ� �ٶ��ٴ� ���̴�. ��? ����Ҹ� ���߿�
419
FTP�ε� ������ �� �ֵ��� ���� �����̿������ ���̳�
420
CGI�� ���õ� ������ ���� �α� �Ⱦ���.</p>
426
<p>�ذ�å�� �� �κ����� ������: ���� ���丮 ���ؿ���
427
�ʿ��� ��� �������� �������� ����� CGI ��ũ��Ʈ��
428
�ʿ��ϴ�. ���� �� ��ũ��Ʈ���� ������ ����
429
<code>/e/netsw/.www/</code>�� ���:</p>
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
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>
457
<div class="example"><pre>
458
RewriteRule ^net.sw$ net.sw/ [R]
459
RewriteRule ^net.sw/(.*)$ e/netsw/$1
462
<p>ù��° ��Ģ�� �������� �������� ���� ��û�� ���ؼ�
463
����ߴ�! �ι�° ��Ģ�� ���� �۾��� �Ѵ�. ���� ���丮��
464
�������� <code>/e/netsw/.www/.wwwacl</code>�� ��������
467
<div class="example"><pre>
468
Options ExecCGI FollowSymLinks Includes MultiViews
472
# �� �κ��� /net.sw/ �� �����Ѵ�
476
# cgi ��ũ��Ʈ�� ���ۼ��Ѵ�
477
RewriteRule ^$ netsw-home.cgi [L]
478
RewriteRule ^index\.html$ netsw-home.cgi [L]
480
# �������� ���丮�� �������� ��û�� ���
482
RewriteRule ^.+/(netsw-[^/]+/.+)$ $1 [L]
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]
492
# �ٸ� cgi ��ũ��Ʈ�� ó����
494
RewriteRule !^netsw-lsdir\.cgi.* - [C]
495
RewriteRule (.*) netsw-lsdir.cgi/$1
498
<p>�ؼ��� ���� ��Ʈ:</p>
501
<li>��° �κп��� ��ü �ʵ�('<code>-</code>')��
502
���� <code>L</code> (last) �÷��װ� ������ �ָ��϶�</li>
504
<li>������ �κп��� ù��° ��Ģ�� <code>!</code>
505
(not) ���ڿ� <code>C</code> (chain) �÷��� �ָ��϶�</li>
507
<li>������ ��Ģ���� ��Ÿ �ش����� �ʴ� ��� ��츦
508
��Ƴ��� ������ �ָ��϶�</li>
515
<h3>NCSA imagemap�� ����ġ <code>mod_imagemap</code>����</h3>
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>�� ���� ��û�� �ƾ�
537
<p>��� ��û���� �պκ��� �������� �����ϴ� ���� ��Ģ��
540
<div class="example"><pre>
542
RewriteRule ^/cgi-bin/imagemap(.*) $1 [PT]
549
<h3>���� ���丮���� ������ �˻�</h3>
557
<p>���� �������� ���� ���丮���� ������ ã�ƾ� ��
558
���� �ִ�. �� ��� MultiViews�� �ٸ� ����� ������
565
<p>���� ���丮���� ������ ã�� ��Ģ�� ���� ���α��Ѵ�.</p>
567
<div class="example"><pre>
570
# ���� custom/���� ã�� �õ��ϰ�...
572
RewriteCond /your/docroot/<strong>dir1</strong>/%{REQUEST_FILENAME} -f
573
RewriteRule ^(.+) /your/docroot/<strong>dir1</strong>/$1 [L]
575
# �ι�°�� pub/���� ã�� �õ��Ѵ�...
577
RewriteCond /your/docroot/<strong>dir2</strong>/%{REQUEST_FILENAME} -f
578
RewriteRule ^(.+) /your/docroot/<strong>dir2</strong>/$1 [L]
580
# ��ã���� �ٸ� Alias�� ScriptAlias ���þ� ������ �����Ѵ�.
581
RewriteRule ^(.+) - [PT]
588
<h3>URL�� ���� ȯ�溯���� �����Ѵ�</h3>
596
<p>��û�鰣�� ���������� �����ϱ����� URL�� ������
597
���ڵ��ϴ� ����� �ִ�. ���� ���� �� ������ �����ϱ�����
598
��� �������� CGI wrapper�� ����ϰ� ���� �ʴ�.</p>
604
<p>���ۼ� ��Ģ�� ����Ͽ� ���������� �����ϰ�, ������
605
������ ���߿� XSSI�� CGI���� ����ϱ����� ȯ�溯����
606
�����Ѵ�. ���� URL <code>/foo/S=java/bar/</code>��
607
<code>/foo/bar/</code>�� ��ȯ�ǰ� <code>STATUS</code>���
608
ȯ�溯�� ���� "java"�� �����Ѵ�.</p>
610
<div class="example"><pre>
612
RewriteRule ^(.*)/<strong>S=([^/]+)</strong>/(.*) $1/$3 [E=<strong>STATUS:$2</strong>]
619
<h3>���� ����� ȣ��Ʈ</h3>
627
<p>����ȣ��Ʈ�� ������� �ʰ� ���� ��ǻ�ͷ� DNS A
629
<code>www.<strong>username</strong>.host.domain.com</code>��
630
������� Ȩ�������� �����ϰ� �ʹ�.</p>
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>�� ���ۼ��� ��
642
<div class="example"><pre>
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
653
<h3>Ȩ���丮�� �ܺ� ������ �����̷���</h3>
661
<p>���� ������ <code>ourdomain.com</code> �ۿ��� ��û��
662
������ Ȩ���丮 URL�� �ٸ� ������
663
<code>www.somewhere.com</code>���� ���ٸ������ϱ�
664
�ٶ���. ���� ����ȣ��Ʈ �����ҿ��� ����Ѵ�.</p>
670
<p>���ۼ� ������ ����ϸ� �ȴ�:</p>
672
<div class="example"><pre>
674
RewriteCond %{REMOTE_HOST} <strong>!^.+\.ourdomain\.com$</strong>
675
RewriteRule ^(/~.+) http://www.somewhere.com/$1 [R,L]
682
<h3>������ URL�� �ٸ� �������� �����̷���</h3>
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>
701
<p>ù��° ����� �������� �������� �������� ��������
704
<div class="example"><pre>
706
RewriteCond /your/docroot/%{REQUEST_FILENAME} <strong>!-f</strong>
707
RewriteRule ^(.+) http://<strong>webserverB</strong>.dom/$1
710
<p>�� ����� ������ <code class="directive"><a href="../mod/core.html#documentroot">DocumentRoot</a></code> �ȿ� �ִ� ��������
711
�����ϴٴ� ���̴�. (���� ��� Ȩ���丮 ���� ����)
712
������ �߰��� �� ������, �� ���� ����� �ִ�:</p>
714
<div class="example"><pre>
716
RewriteCond %{REQUEST_URI} <strong>!-U</strong>
717
RewriteRule ^(.+) http://<strong>webserverB</strong>.dom/$1
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>
732
<h3>Ȯ�� �����̷���</h3>
740
<p>���� �����̷����ϴ� URL�� �� ������ �ʿ䰡 �ִ�.
741
����ġ ���� URL escape �Լ��� "<code>url#anchor</code>"
742
���� URL�� anchor�� escape�Ѵ�. ����ġ��
743
<code>uri_escape()</code> �Լ��� �칰����(#)�� ����
744
escape�ϹǷ� ����� �� ����. ���� ��� �̷� URL��
745
�����̷����� �� �ֳ�?</p>
751
<p>���� �����̷����ϴ� NPH-CGI ��ũ��Ʈ�� ����� �ذ�å��
752
�ʿ��ϴ�. escape�� ���� �ʱ���̴� (NPH=non-parseable
753
headers). ���� ���� ���������� �Ͽ� (���ۼ� ��Ģ��
754
���κп� ����ؾ� �Ѵ�) ���ο� URL scheme
755
<code>xredirect:</code>�� �����Ѵ�:</p>
757
<div class="example"><pre>
758
RewriteRule ^xredirect:(.+) /path/to/nph-xredirect.cgi/$1 \
759
[T=application/x-httpd-cgi,L]
762
<p>���� <code>xredirect:</code>�� �����ϴ� ��� URL��
763
<code>nph-xredirect.cgi</code> ���α��� ���ϰ� �ȴ�.
764
����� ������ ����:</p>
766
<div class="example"><pre>
769
## nph-xredirect.cgi -- NPH/CGI script for extended redirects
770
## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
774
$url = $ENV{'PATH_INFO'};
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";
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";
794
<p>���� <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>�� ���� �������ϴ�
795
��� URL scheme���� �����̷����� �� �ִ�. ���� ���,
796
������ ���� <code>news:newsgroup</code>���� �����̷�����
799
<div class="example"><pre>
800
RewriteRule ^anyurl xredirect:news:newsgroup
803
<div class="note">����: ���� Ư���� "���" ��Ģ�� ����Ͽ�
804
<code>xredirect:</code>�� �������� Ȯ���ؾ� �ϱ����
805
��Ģ�� <code>[R]</code>�̳� <code>[R,L]</code>�� ����ϸ�
812
<h3>����� ���� �߰�(multiplexer)</h3>
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>
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>
838
<div class="example"><pre>
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]
845
<div class="example"><pre>
847
## map.cxan -- Multiplexing Map for CxAN
850
de ftp://ftp.cxan.de/CxAN/
851
uk ftp://ftp.cxan.uk/CxAN/
852
com ftp://ftp.cxan.com/CxAN/
861
<h3>�ð��� ���� ���ۼ�</h3>
869
<p>�ð��� ���� �ٸ� ������ �����ϴ� ��� ���� �������ڴ�
870
��� Ư���� �������� �����̷����ϱ����� CGI ��ũ��Ʈ��
871
����Ѵ�. <code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>�δ� ���
878
<p>���ۼ� ���ǿ��� ����� �� �ִ� ���� <code>TIME_xxx</code>
879
������ �ִ�. ������ Ư���� �������� ��
880
<code><STRING</code>, <code>>STRING</code>,
881
<code>=STRING</code>�� ����Ͽ� �ð��� ���� �����̷�����
884
<div class="example"><pre>
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
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>
902
<h3>YYYY�� XXXX�� ������ ��� ��ȣȯ</h3>
910
<p>���� <code>.html</code> ������ <code>.phtml</code>��
911
��ȯ�ϴ� �� <code>document.YYYY</code>��
912
<code>document.XXXX</code>�� �������� ��ȣȯ(backward
913
compatibility) URL�� (���������� �����ϰ�) ���� ��
920
<p>�̸��� �⺻�̸����� ���ۼ����� ���ο� Ȯ���ڸ�
921
���� ������ �ִ��� �˻��Ѵ�. �ִٸ� �� ���ϸ��� ����ϰ�,
922
������ URL�� ���� ���·� ���ۼ��Ѵ�.</p>
925
<div class="example"><pre>
927
# ����.phtml �� �ִ� ���
928
# ����.html �� ����.phtml ��
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
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>
952
<h3>���� ���� (���߱�)</h3>
960
<p>�ֱ� <code>foo.html</code>�� <code>bar.html</code>��
961
�����ϰ� ��ȣȯ���� ���� ���� URL�� ��� �����ϰ�
962
�ʹٰ� ��������. ����ڴ� ���� URL�� ����Ǿ��ٴ�
963
����� ��ġä�� ���Ѵ�.</p>
969
<p>���� ��Ģ���� ���� URL�� ���������� ���ο� URL��
972
<div class="example"><pre>
975
RewriteRule ^<strong>foo</strong>\.html$ <strong>bar</strong>.html
982
<h3>���� ���� (�˸���)</h3>
990
<p>�ٽ� <code>foo.html</code>�� <code>bar.html</code>��
991
�����ϰ� ��ȣȯ���� ���� ���� URL�� ��� �����ϰ�
992
�ʹٰ� ��������. ���� ������ ���� URL�� ����ϸ�
993
����ڿ��� ���ο� URL�� ��Ʈ�� �˷��ش�. ��, ������
1000
<p>���ο� URL�� HTTP �����̷����ϴ�. ���� ��������
1001
���ο� URL�� ���̰� �������� ����ڰ� �˰Եȴ�:</p>
1003
<div class="example"><pre>
1006
RewriteRule ^<strong>foo</strong>\.html$ <strong>bar</strong>.html [<strong>R</strong>]
1013
<h3>�������� ���� ����</h3>
1021
<p>�ּ��� �߿��� �ֻ��� �������� �������� ����ȭ��
1022
�������� �����ؾ��� ��찡 �ִ�. ��, �ֽ� Netscape
1023
���������Դ� �ֻ��� ������, Lynx ���������Դ�
1024
���� ������, ������ ���������� ������� ������
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> �������� �´�. �Ʒ� ��Ģ��
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>]
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>]
1050
RewriteRule ^foo\.html$ foo.<strong>32</strong>.html [<strong>L</strong>]
1065
<p>�ܺ� ȣ��Ʈ�� �츮 ����Ʈ�� �������� ���� ����
1066
���������� �ִٰ� ��������. FTP ������ ��� ���� �ܺ�
1067
�ڷ��� �ֽź��纻�� �����ϴ� <code>mirror</code> ���α���
1068
����� �� �ְ�, ��������� HTTP�� ����� �۾��� �ϴ�
1069
<code>webcopy</code> ���α��� ����� �� �ִ�. ����
1070
�� ��� ��� ������ �ִ�: ���纻�� ������ ���α���
1071
�������� ���� �ֽ������� �����ȴ�. ���� �����ؾ��ϴ�
1072
������ �̷��� �ƴ϶�� ���ڴ�. ��� (�ܺ� ȣ��Ʈ����
1073
�ڷᰡ ���ŵǸ�) �ʿ��Ҷ� �ڵ����� �ڷḦ �����ϴ�
1074
���� �̷��� �ʿ��ϴ�.</p>
1080
<p>�̸� ���� <dfn>Proxy Throughput</dfn> ����� (�÷���
1081
<code>[P]</code>) ����Ͽ� �ܺ� �������� Ȥ�� �ܺ�
1082
������ ��ü�� �츮 �̸��������� �����Ѵ�:</p>
1084
<div class="example"><pre>
1087
RewriteRule ^<strong>hotsheet/</strong>(.*)$ <strong>http://www.tstimpreso.com/hotsheet/</strong>$1 [<strong>P</strong>]
1090
<div class="example"><pre>
1093
RewriteRule ^<strong>usa-news\.html</strong>$ <strong>http://www.quux-corp.com/news/index.html</strong> [<strong>P</strong>]
1112
<div class="example"><pre>
1114
RewriteCond /mirror/of/remotesite/$1 -U
1115
RewriteRule ^http://www\.remotesite\.com/(.*)$ /mirror/of/remotesite/$1
1122
<h3>���� �ڷḦ ��Ʈ��ݿ��� ��������</h3>
1130
<p>���� �ڷḦ ��ȭ���� ��ȣ�ϴ� (����) ��Ʈ��� ��������
1131
(<code>www2.quux-corp.dom</code>) �����ϸ鼭, �����
1132
(�ܺ�) ���ͳ� �������� (<code>www.quux-corp.dom</code>)
1133
�����ϴ� ��ó�� ���̰� �Ѵ�. �ܺ� �������� ��û��
1134
�ڷḦ ���� ���������� �����´�.</p>
1140
<p>���� ��ȭ���� ���� �������� ��ȣ�ϰ� �ܺ� ����������
1141
���� ���������� �ڷḦ ���� �� �ְ� �Ѵ�. ������ ����
1142
��Ŷ���� ��ȭ���� �����Ѵ�:</p>
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>
1149
<p>���� ���������� �˸°� ���Ķ�. ���� �ڷḦ ����������
1150
proxy throughput ����� ���� ��û�ϴ�
1151
<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code> ��Ģ�� �ۼ��Ѵ�:</p>
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>]
1164
<h3>�ε�뷱�� (���� �л��ϱ�)</h3>
1172
<p><code>www.foo.com</code>�� ��ŷ���
1173
<code>www[0-5].foo.com</code> (�� ���� 6��)���� �л��ϰ�
1180
<p>�ſ� �پ��� ������� �� ������ �ذ��� �� �ִ�.
1181
���� DNS�� ����� �� �˷��� ����� �����ϰ�,
1182
<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>�� ����ϴ� ��츦 ���캸��:</p>
1186
<strong>DNS Round-Robin</strong>
1188
<p>���� ������ �ε�뷱�� ����� <code>BIND</code>��
1189
DNS round-robin ����� ����ϴ� ���̴�. ������
1190
���� DNS A(address) ���ڵ忡
1191
<code>www[0-9].foo.com</code>�� �����Ѵ�.</p>
1193
<div class="example"><pre>
1202
<p>���� ���� ���� �߰��Ѵ�:</p>
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.
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>
1229
<strong>DNS �ε�뷱��</strong>
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
1239
<strong>Proxy Throughput Round-Robin</strong>
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>
1246
<div class="example"><pre>
1247
www IN CNAME www0.foo.com.
1250
<p>���� <code>www0.foo.com</code>�� ���Ͻ�����
1251
������ �����Ѵ�. ��, URL�� ������ ������ ����
1252
���Ͻø� ���� �ٸ� 5�� ������ (<code>www1-www5</code>)
1253
�Ѵ�� �����⸸ �Ѵ�. �̸� ���� ���� ��� URL��
1254
�ε�뷱�� ��ũ��Ʈ <code>lb.pl</code>�� ������
1257
<div class="example"><pre>
1259
RewriteMap lb prg:/path/to/lb.pl
1260
RewriteRule ^/(.+)$ ${lb:$1} [P,L]
1263
<p><code>lb.pl</code>�� �ۼ��Ѵ�:</p>
1265
<div class="example"><pre>
1268
## lb.pl -- �ε�뷱�� ��ũ��Ʈ
1273
$name = "www"; # �⺻ ȣ��Ʈ��
1274
$first = 1; # ù��° ���� (�ڽ��� 0�̱� ������, 0�� ������� �ʴ´�)
1275
$last = 5; # round-robin���� ������ ����
1276
$domain = "foo.dom"; # �����θ�
1279
while (<STDIN>) {
1280
$cnt = (($cnt+1) % ($last+1-$first));
1281
$server = sprintf("%s%d.%s", $name, $cnt+$first, $domain);
1282
print "http://$server/$_";
1288
<div class="note">������ ����: �� �� ����� �����Ѱ�?
1289
<code>www0.foo.com</code>�� �δ��� �����ʴ°�?
1290
����, �δ��� �ȴ�. ���� �ܼ��� proxy throughput
1291
��û�� �ϱ���� ������! ��� SSI, CGI, ePerl
1292
���� �������� �ٸ� ������ ó���Ѵ�. �̰��� �ٽ��̴�.</div>
1296
<strong>�ϵ����/TCP Round-Robin</strong>
1298
<p>�ϵ��� ����� �ذ�å�� �ִ�. Cisco�� TCP/IP
1299
���ؿ��� �ε�뷱���� �ϴ� LocalDirector��� ������
1300
�Ǵ�. �����δ� �������� �մܿ� ��ġ�ϴ� ������
1301
ȸ�μ��� ����Ʈ���̴�. �ڱ��� ����ϰ� ������
1302
�ذ�å�� �ʿ��ϴٸ� �̰��� ����϶�.</p>
1310
<h3>���ο� MIME-type, ���ο� ����</h3>
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>
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>]
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>
1346
<div class="example"><pre>
1347
/internal/cgi/user/swwidx?i=/u/user/foo/
1350
<p>������� �ʴ�. ��ũ�� ������ ��ġ<strong>��</strong>
1351
CGI ��ġ�� <strong>���</strong> ����� �ϱ���̴�.
1352
������ �籸���Ѵٸ� ���� �����۸�ũ�� �����ϴµ� ����
1353
�ð��� �ɸ� ���̴�.</p>
1359
<p>�ذ�å�� �ڵ����� ������ CGI�� �����ϴ� ���ο�
1360
Ư���� URL ������ ����� ���̴�. ������ ���� �����Ѵ�:</p>
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
1367
<p>���� <code>/u/user/foo/</code>�� �˻��ϴ� ��ũ��
1370
<div class="example"><pre>
1375
<p>���������� ������ ���� �ڵ���ȯ�ȴ�</p>
1377
<div class="example"><pre>
1378
/internal/cgi/user/wwwidx?i=/u/user/foo/
1381
<p>���� ������� ��ũ �ڿ� <code>:log</code>�� ����Ͽ�
1382
���� �α� CGI ���α��� ������ �� �ִ�.</p>
1388
<h3>�������� ��������</h3>
1396
<p>��� �������� ����ڰ� �� �ڿ������� ����
1397
������ <code>foo.html</code>�� ������ <code>foo.cgi</code>��
1404
<p>URL�� CGI ��ũ��Ʈ�� ���ۼ��ϰ�, MIME-type�� �����Ͽ�
1405
CGI ��ũ��Ʈ�� �����ϰ� �Ѵ�. ����
1406
<code>/~quux/foo.html</code>�� ��û�ϸ� ����������
1407
<code>/~quux/foo.cgi</code>�� �����ϰ� �ȴ�.</p>
1409
<div class="example"><pre>
1412
RewriteRule ^foo\.<strong>html</strong>$ foo.<strong>cgi</strong> [T=<strong>application/x-httpd-cgi</strong>]
1419
<h3>�N ������ �����</h3>
1427
<p>�� ����� �Ƿ� ����̴�: �������� �������� ����������,
1428
�������� �������� �����Ѵ�. ��, �������� �����ϰ�
1429
(���Ͻý��ۿ��� ���� ������ �״��) ���� ��������
1430
��������, ���� ��� �������� �������� �����Ѵ�.
1431
���� ���� (Ȥ�� cron �۾���) ���� �������� �������ʴ�
1432
�� CGI�� ������ �������� �������� �����Ѵ�. ��������
1433
����� ������ �����Ѵ�.</p>
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]
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>
1460
<h3>�ڵ����� ���� ��ħ�ϴ� ����</h3>
1468
<p>������ ���������� ���鶧 �����ڰ� ������ ������
1469
������ �ڵ����� �������� ���� ��ħ�ϴ� ����������
1470
������ �� ������? �Ұ����Ѱ�?</p>
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>
1482
<div class="example"><pre>
1483
RewriteRule ^(/[uge]/[^/]+/?.*):refresh /internal/cgi/apache/nph-refresh?f=$1
1486
<p>���� ���� URL�� �����ϸ�</p>
1488
<div class="example"><pre>
1489
/u/foo/bar/page.html:refresh
1492
<p>���� URL�� ���������� ���</p>
1494
<div class="example"><pre>
1495
/internal/cgi/apache/nph-refresh?f=/u/foo/bar/page.html
1498
<p>���� NPH-CGI ��ũ��Ʈ�� ���Ҵ�. ���� "���ڿ���
1499
�������� ���ܵ�"�̶�� �������� ;-) ���� �̰͵� �����Ѵ�.</p>
1501
<div class="example"><pre>
1504
## nph-refresh -- NPH/CGI script for auto refreshing pages
1505
## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved.
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\"";
1518
$QS_s = 1 if ($QS_s eq '');
1519
$QS_n = 3600 if ($QS_n 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";
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";
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;
1540
sub print_http_headers_multipart_next {
1541
print "\n--$bound\n";
1544
sub print_http_headers_multipart_end {
1545
print "\n--$bound--\n";
1549
local($buffer) = @_;
1550
$len = length($buffer);
1551
print "Content-type: text/html\n";
1552
print "Content-length: $len\n\n";
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);
1567
$buffer = &readfile($QS_f);
1568
&print_http_headers_multipart_begin;
1569
&displayhtml($buffer);
1572
local($file) = $_[0];
1575
($x, $x, $x, $x, $x, $x, $x, $x, $x, $mtime) = stat($file);
1579
$mtimeL = &mystat($QS_f);
1581
for ($n = 0; $n &lt; $QS_n; $n++) {
1583
$mtime = &mystat($QS_f);
1584
if ($mtime ne $mtimeL) {
1587
$buffer = &readfile($QS_f);
1588
&print_http_headers_multipart_next;
1589
&displayhtml($buffer);
1591
$mtimeL = &mystat($QS_f);
1598
&print_http_headers_multipart_end;
1609
<h3>�뷮�� ����ȣ��Ʈ</h3>
1617
<p>����ȣ��Ʈ�� ��� �ִٸ� ����ġ�� <code class="directive"><a href="../mod/core.html#virtualhost"><VirtualHost></a></code>
1618
����� �� �����Ѵ�. ���� ����ȣ��Ʈ�� ���鰳 �ִ�
1619
ISP��� �� ����� �ּ��� �ƴϴ�.</p>
1625
<p>�� ����� �����Ϸ��� <dfn>Proxy Throughput</dfn>
1626
����� (�÷��� <code>[P]</code>) ����Ͽ� �ܺ� ��������
1627
Ȥ�� ��ü �ܺ� �������� �츮�� �̸������� �����Ѵ�:</p>
1629
<div class="example"><pre>
1633
www.vhost1.dom:80 /path/to/docroot/vhost1
1634
www.vhost2.dom:80 /path/to/docroot/vhost2
1636
www.vhostN.dom:80 /path/to/docroot/vhostN
1639
<div class="example"><pre>
1644
# �����̷�Ʈ�Ҷ� ���� ȣ��Ʈ���� ����Ѵ�.
1648
# ����ȣ��Ʈ�� CLF ���� �տ� �߰��Ѵ�
1649
CustomLog /path/to/access_log "%{VHOST}e %h %l %u %t \"%r\" %>s %b"
1652
# �ּ������� ���ۼ� ������ ����Ѵ�
1655
# �� ���� �����Ѵ�: �ϳ��� URL�� ��ġ��,
1656
# �ٸ� �ϳ��� ����ȣ��Ʈ�� DocumentRoot��
1658
RewriteMap lowercase int:tolower
1659
RewriteMap vhost txt:/path/to/vhost.map
1661
# ���� ũ�� ������ ��Ģ �Ѱ��� ����Ͽ�
1662
# ����ȣ��Ʈ�� �����Ѵ�.
1664
# 1. ����ȣ��Ʈ���� ���� ����ϴ� ��ġ�� �������� �ʴ´�
1665
RewriteCond %{REQUEST_URL} !^/commonurl1/.*
1666
RewriteCond %{REQUEST_URL} !^/commonurl2/.*
1668
RewriteCond %{REQUEST_URL} !^/commonurlN/.*
1670
# 2. �츮�� ���� ����ϴ� ����� Host �����
1671
# ����ȣ��Ʈ�� �����ϹǷ�
1672
# Host ����� �ִ��� Ȯ���Ѵ�
1673
RewriteCond %{HTTP_HOST} !^$
1675
# 3. ȣ��Ʈ���� �ҹ��ڷ� �����
1676
RewriteCond ${lowercase:%{HTTP_HOST}|NONE} ^(.+)$
1678
# 4. vhost.map���� ȣ��Ʈ���� ã��
1680
# (������ "NONE"�� �ƴϴ�)
1681
RewriteCond ${vhost:%1} ^(/.*)$
1683
# 5. ���������� URL�� ���� ��ġ�� �����ϰ�
1684
# �α� ��������� ����ȣ��Ʈ�� ����� �д�
1685
RewriteRule ^/(.*)$ %1/$1 [E=VHOST:${lowercase:%{HTTP_HOST}}]
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>
1707
<p>��� �ϸ� Ư�� �������� �������� �ܾ������ ������
1708
�κ��� ���� �� �ֳ�? "Robot Exclusion Protocol" ����
1709
������ <code>/robots.txt</code> ������ ���� �̷� �κ���
1710
���µ� ������� �ʴ�.</p>
1716
<p>(�Ƹ��� ���丮�� ��� �κ��� ���ƴٴϸ� ������
1717
�δ��� ū ���) ������ <code>/~quux/foo/arc/</code>��
1718
�ִ� URL���� �ź��ϴ� ��Ģ�� ����Ѵ�. �츮�� Ư��
1719
�κ��� ������ ���ƾ� �Ѵ�. ��, �κ��� �����ϴ� ȣ��Ʈ��
1720
���� �����δ� ������ϸ�, �� ȣ��Ʈ�� ����ڵ� ���ƹ�����
1721
�ȴ�. User-Agent HTTP ��� ������ ���Ѵ�.</p>
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>]
1733
<h3>�� �۰��� ����</h3>
1741
<p><code>http://www.quux-corp.de/~quux/</code>�� �ִ�
1742
���������� GIF ���� �����Ѵٰ� ��������. �� ����
1743
���־, �ٸ� ������� �ڽ��� �������� ���� ��ũ��
1744
�Ǵ�. ������ ���ʿ��� �δ��� �ǹǷ� ���� �ʹ�.</p>
1750
<p>���� 100% ��ȣ�� ���� ������, �ּ��� ��������
1751
HTTP Referer ����� ������ ��� ������ �� �ִ�.</p>
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]
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]
1777
<p>��� �ܺο��� ������ ������ �� ���� ȣ��Ʈ �����
1784
<p>����ġ >= 1.3b6����:</p>
1786
<div class="example"><pre>
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]
1794
<p>����ġ <= 1.3b6����:</p>
1796
<div class="example"><pre>
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
1806
<div class="example"><pre>
1810
## ����! �̰��� ���ó�� �������� ����� �ƴ϶� ���̴�.
1811
## mod_rewrite�� �� ������ Ű/�� ������ �ؼ��ϱ����,
1812
## �� ���� �� �ڸ��� �ּ��� "-"�� �ʿ��ϴ�.
1832
<p>��� Ư�� ȣ��Ʈ Ȥ�� Ư�� ȣ��Ʈ�� ����ڰ�
1833
����ġ ���Ͻø� ����� �� ������ �ϳ�?</p>
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>
1845
<div class="example"><pre>
1846
RewriteCond %{REMOTE_HOST} <strong>^badhost\.mydomain\.com$</strong>
1847
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]
1850
<p>...���� ������ user@host�� ���� �ź��Ѵ�:</p>
1852
<div class="example"><pre>
1853
RewriteCond %{REMOTE_IDENT}@%{REMOTE_HOST} <strong>^badguy@badhost\.mydomain\.com$</strong>
1854
RewriteRule !^http://[^/.]\.mydomain.com.* - [F]
1861
<h3>Ư���� ���� ���</h3>
1869
<p>���� �ſ� Ư���� ������ �ʿ��� ���� �ִ�. ����
1870
���, �̸� �����ص� ��������� �˻��Ѵ�. �̵鿡�Ը�
1871
(<code class="module"><a href="../mod/mod_auth_basic.html">mod_auth_basic</a></code>�� Basic Auth�� �����
1872
���� ��) ���ٸ� �������� ������ ����Ѵ�.</p>
1878
<p>ģ���� ������ �����ϵ��� ���ۼ� ��Ģ���� ����Ѵ�:</p>
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]
1891
<h3>Referer��� ��ȯ��(deflector)</h3>
1899
<p>"Referer" HTTP ����� ���� ���ϴ´�� ������������
1900
������ �� �ִ� ������ URL ��ȯ�⸦ ���� �� �ִ°�?</p>
1906
<p>������ ���� ������ ��Ģ��...</p>
1908
<div class="example"><pre>
1909
RewriteMap deflector txt:/path/to/deflector.map
1911
RewriteCond %{HTTP_REFERER} !=""
1912
RewriteCond ${deflector:%{HTTP_REFERER}} ^-$
1913
RewriteRule ^.* %{HTTP_REFERER} [R,L]
1915
RewriteCond %{HTTP_REFERER} !=""
1916
RewriteCond ${deflector:%{HTTP_REFERER}|NOT-FOUND} !=NOT-FOUND
1917
RewriteRule ^.* ${deflector:%{HTTP_REFERER}} [R,L]
1920
<p>... ���ۼ� �ʰ� ���� ����Ѵ�:</p>
1922
<div class="example"><pre>
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/
1932
<p>���� ��û�� �ڵ����� (�ʿ��� ������ "<code>-</code>"��
1933
����� ���) ������������ (URL�� �ʿ� �ִ� ��� �ι�°
1934
�ƱԸ�Ʈ��) Ư�� URL�� �����̷����Ѵ�.</p>
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>
1946
<h3>�ܺ� ���ۼ� ����</h3>
1954
<p>FAQ: ��� �̷����� ����� ������ Ǯ �� �ִ°�?
1955
<code class="module"><a href="../mod/mod_rewrite.html">mod_rewrite</a></code>�δ� �ذ�å�� �Ⱥ��δ�...</p>
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>
1967
<div class="example"><pre>
1969
RewriteMap quux-map <strong>prg:</strong>/path/to/map.quux.pl
1970
RewriteRule ^/~quux/(.*)$ /~quux/<strong>${quux-map:$1}</strong>
1973
<div class="example"><pre>
1976
# ����ġ ������ ������ �ʵ���
1977
# ����� ���۸� ������� �ʴ´�
1980
# stdin���� ���پ� URL�� �а�
1981
# stdout�� ��ȯ�� URL�� ����Ѵ�
1988
<p>�����ϱ����� ��� <code>/~quux/foo/...</code> URL��
1989
<code>/~quux/bar/...</code>�� ���ۼ��ϴ� ��ũ��Ʈ��
1990
���� �����. ������ ������� ���α����� �� �ִ�.
1991
���� �Ϲ� ����ڰ� �̷� ���� <strong>�����</strong>
1992
�� �ִٰ� �ϴ����, ���� �ý��� �����ڸ��� ����
1993
<strong>�����ؾ�</strong> ���� �����϶�.</p>
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 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>
b'\\ No newline at end of file'