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>mod_setenvif - 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" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" /> 12<script src="/style/scripts/prettify.js" type="text/javascript"> 13</script> 14 15<link href="/images/favicon.ico" rel="shortcut icon" /></head> 16<body> 17<div id="page-header"> 18<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p> 19<p class="apache">Apache HTTP Server Version 2.2</p> 20<img alt="" src="/images/feather.gif" /></div> 21<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div> 22<div id="path"> 23<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="./">���</a></div> 24<div id="page-content"> 25<div id="preamble"><h1>����ġ ��� mod_setenvif</h1> 26<div class="toplang"> 27<p><span>������ ���: </span><a href="/en/mod/mod_setenvif.html" hreflang="en" rel="alternate" title="English"> en </a> | 28<a href="/ja/mod/mod_setenvif.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | 29<a href="/ko/mod/mod_setenvif.html" title="Korean"> ko </a> | 30<a href="/tr/mod/mod_setenvif.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 31</div> 32<div class="outofdate">�� ������ �ֽ��� ���� �ƴմϴ�. 33 �ֱٿ� ����� ������ ���� ������ ����ϼ���.</div> 34<table class="module"><tr><th><a href="module-dict.html#Description">����:</a></th><td>��û�� ���ݿ� ��� ȯ�溯�� ������ �����Ѵ�</td></tr> 35<tr><th><a href="module-dict.html#Status">����:</a></th><td>Base</td></tr> 36<tr><th><a href="module-dict.html#ModuleIdentifier">����:</a></th><td>setenvif_module</td></tr> 37<tr><th><a href="module-dict.html#SourceFile">�ҽ�����:</a></th><td>mod_setenvif.c</td></tr></table> 38<h3>���</h3> 39 40 41 <p><code class="module"><a href="/mod/mod_setenvif.html">mod_setenvif</a></code> ����� ��û�� ������ 42 ����ǥ���Ŀ� �ش��ϴ��� ���η� ȯ�溯���� �����Ѵ�. ������ 43 �ٸ� �κ��� �ൿ�� �����Ҷ� �� ȯ�溯���� ����� �� �ִ�.</p> 44 45 <p>�������Ͽ� ������ ���� ���þ ó���Ѵ�. ���� 46 ������ MSIE�� �ƴ϶� mozilla�� ��� <code>netscape</code>�� 47 �����ϴ� �Ʒ� ���� ���� ���� ���þ �Բ� ����� �� �ִ�.</p> 48 49<div class="example"><p><code> 50 BrowserMatch ^Mozilla netscape<br /> 51 BrowserMatch MSIE !netscape<br /> 52</code></p></div> 53</div> 54<div id="quickview"><h3 class="directives">���þ��</h3> 55<ul id="toc"> 56<li><img alt="" src="/images/down.gif" /> <a href="#browsermatch">BrowserMatch</a></li> 57<li><img alt="" src="/images/down.gif" /> <a href="#browsermatchnocase">BrowserMatchNoCase</a></li> 58<li><img alt="" src="/images/down.gif" /> <a href="#setenvif">SetEnvIf</a></li> 59<li><img alt="" src="/images/down.gif" /> <a href="#setenvifnocase">SetEnvIfNoCase</a></li> 60</ul> 61<h3>���</h3> 62<ul class="seealso"> 63<li><a href="/env.html">����ġ�� ȯ�溯��</a></li> 64</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 65 66<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 67<div class="directive-section"><h2><a name="BrowserMatch" id="BrowserMatch">BrowserMatch</a> <a name="browsermatch" id="browsermatch">���þ�</a></h2> 68<table class="directive"> 69<tr><th><a href="directive-dict.html#Description">����:</a></th><td>HTTP User-Agent�� ��� ȯ�溯���� �����Ѵ�</td></tr> 70<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>BrowserMatch <em>regex [!]env-variable</em>[=<em>value</em>] 71[[!]<em>env-variable</em>[=<em>value</em>]] ...</code></td></tr> 72<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ, directory, .htaccess</td></tr> 73<tr><th><a href="directive-dict.html#Override">Override �ɼ�:</a></th><td>FileInfo</td></tr> 74<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 75<tr><th><a href="directive-dict.html#Module">���:</a></th><td>mod_setenvif</td></tr> 76</table> 77 <p><code class="directive">BrowserMatch</code>�� <code class="directive"><a href="#setenvif">SetEnvIf</a></code> ���þ��� Ư���� 78 ����, HTTP ��û ��� <code>User-Agent</code>�� ��� ȯ�溯���� 79 �����Ѵ�. ���� �� ���� ����:</p> 80<div class="example"><p><code> 81 BrowserMatchNoCase Robot is_a_robot<br /> 82 SetEnvIfNoCase User-Agent Robot is_a_robot<br /> 83</code></p></div> 84 85 <p>�߰� ����:</p> 86<div class="example"><p><code> 87 BrowserMatch ^Mozilla forms jpeg=yes browser=netscape<br /> 88 BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript<br /> 89 BrowserMatch MSIE !javascript<br /> 90</code></p></div> 91 92</div> 93<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 94<div class="directive-section"><h2><a name="BrowserMatchNoCase" id="BrowserMatchNoCase">BrowserMatchNoCase</a> <a name="browsermatchnocase" id="browsermatchnocase">���þ�</a></h2> 95<table class="directive"> 96<tr><th><a href="directive-dict.html#Description">����:</a></th><td>��ҹ��ڸ� ���������ʰ� User-Agent�� ��� ȯ�溯���� 97�����Ѵ�</td></tr> 98<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>BrowserMatchNoCase <em>regex [!]env-variable</em>[=<em>value</em>] 99 [[!]<em>env-variable</em>[=<em>value</em>]] ...</code></td></tr> 100<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ, directory, .htaccess</td></tr> 101<tr><th><a href="directive-dict.html#Override">Override �ɼ�:</a></th><td>FileInfo</td></tr> 102<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 103<tr><th><a href="directive-dict.html#Module">���:</a></th><td>mod_setenvif</td></tr> 104</table> 105 106 <p><code class="directive">BrowserMatchNoCase</code> ���þ�� <code class="directive"><a href="#browsermatch">BrowserMatch</a></code> ���þ�� 107 �ǹ̻� ����. ���� �� ���þ�� ��ҹ��ڸ� ���������ʴ´�. 108 ���� ���:</p> 109<div class="example"><p><code> 110 BrowserMatchNoCase mac platform=macintosh<br /> 111 BrowserMatchNoCase win platform=windows<br /> 112</code></p></div> 113 114 <p><code class="directive">BrowserMatch</code>�� 115 <code class="directive">BrowserMatchNoCase</code> ���þ�� 116 <code class="directive"><a href="#setenvif">SetEnvIf</a></code>�� 117 <code class="directive"><a href="#setenvifnocase">SetEnvIfNoCase</a></code> 118 ���þ��� Ư���� ����. ���� �� ���� ����:</p> 119<div class="example"><p><code> 120 BrowserMatchNoCase Robot is_a_robot<br /> 121 SetEnvIfNoCase User-Agent Robot is_a_robot<br /> 122</code></p></div> 123 124</div> 125<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 126<div class="directive-section"><h2><a name="SetEnvIf" id="SetEnvIf">SetEnvIf</a> <a name="setenvif" id="setenvif">���þ�</a></h2> 127<table class="directive"> 128<tr><th><a href="directive-dict.html#Description">����:</a></th><td>��û�� ���� ��� ȯ�溯���� �����Ѵ�</td></tr> 129<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>SetEnvIf <em>attribute 130 regex [!]env-variable</em>[=<em>value</em>] 131 [[!]<em>env-variable</em>[=<em>value</em>]] ...</code></td></tr> 132<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ, directory, .htaccess</td></tr> 133<tr><th><a href="directive-dict.html#Override">Override �ɼ�:</a></th><td>FileInfo</td></tr> 134<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 135<tr><th><a href="directive-dict.html#Module">���:</a></th><td>mod_setenvif</td></tr> 136</table> 137 <p><code class="directive">SetEnvIf</code> ���þ�� ��û�� ���� 138 ��� ȯ�溯���� �����Ѵ�. ù��° �ƱԸ�Ʈ <em>attribute</em>�� 139 ���� �������� �ϳ���:</p> 140 141<ol> 142<li>HTTP ��û ��� (�� �ڼ��� ������ <a href="http://www.rfc-editor.org/rfc/rfc2616.txt">RFC2616</a> 143 ���); ���� ���: <code>Host</code>, <code>User-Agent</code>, 144 <code>Referer</code>, <code>Accept-Language</code>. ����ǥ������ 145 ����Ͽ� ���� ��û ����� ��Ī�� �� �ִ�.</li> 146 147<li>��û�� ���� ������ �ϳ�: 148 <ul> 149 <li><code>Remote_Host</code> - (�ִٸ�) ��û�ϴ� Ŭ���̾�Ʈ�� 150 ȣ��Ʈ��</li> 151 152 <li><code>Remote_Addr</code> - ��û�ϴ� Ŭ���̾�Ʈ�� IP �ּ�</li> 153 154 <li><code>Server_Addr</code> - ��û�� �� ������ IP �ּ� 155 (2.0.43 ���� ���Ŀ���)</li> 156 157 <li><code>Request_Method</code> - ����� ��� �̸� 158 (<code>GET</code>, <code>POST</code>, <em>���</em>)</li> 159 160 <li><code>Request_Protocol</code> - ��û�� �������� �̸��� 161 ���� (<em>���� ���</em>, "HTTP/0.9", "HTTP/1.1", <em>��.</em>)</li> 162 163 <li><code>Request_URI</code> - HTTP ��û���� ��û�� �ڿ� 164 -- �Ϲ������� URL���� ���ǹ��ڿ��� ������ ��Ŵ(scheme)�� 165 ȣ��Ʈ ���� �κ�</li> 166 </ul> 167</li> 168 169<li>��û�� ����� ȯ�溯�� �̸�. ���� <code class="directive">SetEnvIf</code> 170���þ�� ���� ���þ��� ��� �˻��� �� �ִ�. ���� 171<code>SetEnvIf[NoCase]</code> ���þ�� ������ ȯ�溯������ 172�˻��� �� �ִ�. '����'�̶� (������� ����) �� ���� ���� Ȥ�� 173���þ��� ���� ���� ������ ���Ѵ�. ��û ������ �ƴϰ� ����ǥ������ 174�ƴ� <em>attribute</em>�� ȯ�溯���� ����Ѵ�.</li> 175</ol> 176 177<p>�ι�° �ƱԸ�Ʈ�� (<em>regex</em>) <a href="http://www.pcre.org/">Perl ȣȯ ����ǥ����</a>�̴�. 178�̴� POSIX.2 egrep�� ����ǥ���İ� ����ϴ�. <em>regex</em>�� 179<em>attribute</em>�� �����ϸ� ������ �ƱԸ�Ʈ�� ó���Ѵ�.</p> 180 181<p>������ �ƱԸ�Ʈ�� ������ ������� (��������) ���������̴�. 182������ ���� ����̴�</p> 183 184 <ol> 185 <li><code><em>varname</em></code>, Ȥ��</li> 186 187 <li><code>!<em>varname</em></code>, Ȥ��</li> 188 189 <li><code><em>varname</em>=<em>value</em></code></li> 190 </ol> 191 192 <p>ù��° ���´� ������ "1"�� ����Ѵ�. �ι�° ���´� ������ 193 �̹� ���ǵ� ��� ������ �����ϰ�, ����°�� ������ ������ 194 <code><em>value</em></code>�� �����Ѵ�. ����ġ 2.0.51���� 195 <var>value</var>�� �ִ� <code>$1</code>..<code>$9</code>�� 196 <var>regex</var>�� ��ȣģ ����ǥ�������� ��ü�Ѵ�.</p> 197 198<div class="example"><h3>����:</h3><p><code> 199 200 SetEnvIf Request_URI "\.gif$" object_is_image=gif<br /> 201 SetEnvIf Request_URI "\.jpg$" object_is_image=jpg<br /> 202 SetEnvIf Request_URI "\.xbm$" object_is_image=xbm<br /> 203 :<br /> 204 SetEnvIf Referer www\.mydomain\.com intra_site_referral<br /> 205 :<br /> 206 SetEnvIf object_is_image xbm XBIT_PROCESSING=1<br /> 207 :<br /> 208 SetEnvIf ^TS* ^[a-z].* HAVE_TS<br /> 209</code></p></div> 210 211 <p>ó�� �� ���� �̹��� ������ ��û�� ��� ȯ�溯�� 212 <code>object_is_image</code>�� �����Ѵ�. ��° ���� �������� 213 <code>www.mydomain.com</code> ������Ʈ���� ������ ��� 214 <code>intra_site_referral</code>�� �����Ѵ�.</p> 215 216 <p>������ ���� ��û�� �̸��� "TS"�� �����ϰ� ���� [a-z] 217 �� �ϳ��� �����ϴ� ����� �ִ� ��� ȯ�溯�� 218 <code>HAVE_TS</code>�� �����Ѵ�.</p> 219 220<h3>���</h3> 221<ul> 222<li><a href="/env.html">����ġ�� ȯ�溯��</a>�� �� ���� 223������ �ִ�. 224</li> 225</ul> 226</div> 227<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div> 228<div class="directive-section"><h2><a name="SetEnvIfNoCase" id="SetEnvIfNoCase">SetEnvIfNoCase</a> <a name="setenvifnocase" id="setenvifnocase">���þ�</a></h2> 229<table class="directive"> 230<tr><th><a href="directive-dict.html#Description">����:</a></th><td>��ҹ��ڸ� ���������ʰ� ��û�� ���� ��� ȯ�溯���� 231�����Ѵ�</td></tr> 232<tr><th><a href="directive-dict.html#Syntax">����:</a></th><td><code>SetEnvIfNoCase <em>attribute regex 233 [!]env-variable</em>[=<em>value</em>] 234 [[!]<em>env-variable</em>[=<em>value</em>]] ...</code></td></tr> 235<tr><th><a href="directive-dict.html#Context">������:</a></th><td>�ּ�������, ����ȣ��Ʈ, directory, .htaccess</td></tr> 236<tr><th><a href="directive-dict.html#Override">Override �ɼ�:</a></th><td>FileInfo</td></tr> 237<tr><th><a href="directive-dict.html#Status">����:</a></th><td>Base</td></tr> 238<tr><th><a href="directive-dict.html#Module">���:</a></th><td>mod_setenvif</td></tr> 239</table> 240 241 <p><code class="directive">SetEnvIfNoCase</code>�� �ǹ̻� <code class="directive"><a href="#setenvif">SetEnvIf</a></code> ���þ�� ������, 242 ��ҹ��ڸ� ���������ʰ� ����ǥ������ ã�´�. ���� ���:</p> 243<div class="example"><p><code> 244 SetEnvIfNoCase Host Apache\.Org site=apache 245</code></p></div> 246 247 <p>�� ��� HTTP ��û ��� <code>Host:</code>�� 248 <code>Apache.Org</code>, <code>apache.org</code> ���� �����ϸ� 249 <code>site</code> ȯ�溯���� "<code>apache</code>"�� �����Ѵ�.</p> 250 251</div> 252</div> 253<div class="bottomlang"> 254<p><span>������ ���: </span><a href="/en/mod/mod_setenvif.html" hreflang="en" rel="alternate" title="English"> en </a> | 255<a href="/ja/mod/mod_setenvif.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> | 256<a href="/ko/mod/mod_setenvif.html" title="Korean"> ko </a> | 257<a href="/tr/mod/mod_setenvif.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 258</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 259<script type="text/javascript"><!--//--><![CDATA[//><!-- 260var comments_shortname = 'httpd'; 261var comments_identifier = 'http://httpd.apache.org/docs/2.2/mod/mod_setenvif.html'; 262(function(w, d) { 263 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 264 d.write('<div id="comments_thread"><\/div>'); 265 var s = d.createElement('script'); 266 s.type = 'text/javascript'; 267 s.async = true; 268 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 269 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 270 } 271 else { 272 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 273 } 274})(window, document); 275//--><!]]></script></div><div id="footer"> 276<p class="apache">Copyright 2013 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> 277<p class="menu"><a href="/mod/">���</a> | <a href="/mod/directives.html">���þ��</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">���</a> | <a href="/sitemap.html">����Ʈ��</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 278if (typeof(prettyPrint) !== 'undefined') { 279 prettyPrint(); 280} 281//--><!]]></script> 282</body></html>