Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://www.arcetri.astro.it/manual/ko/mod/mod_setenvif.html
Äàòà èçìåíåíèÿ: Mon Jan 21 19:44:30 2013
Äàòà èíäåêñèðîâàíèÿ: Fri Feb 28 07:06:46 2014
Êîäèðîâêà: ISO8859-5

Ïîèñêîâûå ñëîâà: ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ï ð ï ð ï
mod_setenvif - Apache HTTP Server
<-
Apache > HTTP Server > Documentation > Version 2.2 > È?Åò

ÎÖÖÔÔÅ È?Åò mod_setenvif

ÀÅÄÙ×á Î?Îþ:  en  |  ja  |  ko  |  tr 

ÐÜ É?Ì-ÄÒ ÓæÍÕÖ× É?Ï?ÐÜ ÎÖÄåÄßÄé. ÓæÁéÏÅ Ê?ÀöÅØ ÃËÏûÐÊ ÏÅÎþ É?Ì-È? Ò?Àý×ßÌÌÏô.
ÌÃÈý:ÏôÓËÐ× ÌÊÀíÏÅ Å?Æ? Ø?ÀöÊ?Ì? ÌÃÑ?ÐË Ê?Àö×áÄé
Ë?ÕÒ:Base
È?ÅòÈý:setenvif_module
ÌâÍÊÖÔÐß:mod_setenvif.c

ÏôÎð

mod_setenvif È?ÅòÐÊ ÏôÓËÐ× ÌÊÀíÐÜ Ñ?Áä×?×?ÍÔÏÅ ×èÄ÷×ßÄÒÑ? Ï?ÊÞÇÞ Ø?ÀöÊ?Ì?È? ÌÃÑ?×áÄé. Ì-É?Ð× ÄéÈ? ÊÞÊàÐÜ ×ðÅÏÐË ÀñÑ?×âÆ? ÐÜ Ø?ÀöÊ?Ì?È? Ë÷Ïû×â Ì? ÐæÄé.

ÌÃÑ?ÖÔÐßÏÅ Ã?ÏÐÄÒ Ì?Ì-ÄûÇÞ Ñ?ÍÓÎþÈ? ÓÃÈ?×áÄé. ÁçÇÅÌ- ÊúÆ?ÏüÐ?ÀÅ MSIEÀÅ ÎÖÄßÆ? mozillaÐÞ ÀöÏü netscapeÈ? ÌÃÑ?×ßÄÒ ÎÖÇÅ ÏÉÏÝ ÀÀÐÜ Ï?Ç? Ñ?ÍÓÎþÈ? ×ä Ë÷Ïû×â Ì? ÐæÄé.

BrowserMatch ^Mozilla netscape
BrowserMatch MSIE !netscape

Ñ?ÍÓÎþÅù

Ò?Àý

top

BrowserMatch Ñ?ÍÓÎþ

ÌÃÈý:HTTP User-AgentÏÅ Å?Æ? Ø?ÀöÊ?Ì?È? ÌÃÑ?×áÄé
É?É:BrowserMatch regex [!]env-variable[=value] [[!]env-variable[=value]] ...
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?, directory, .htaccess
Override ÏÙÌ×:FileInfo
Ë?ÕÒ:Base
È?Åò:mod_setenvif

BrowserMatchÄÒ SetEnvIf Ñ?ÍÓÎþÐ× Ö?ÊÀ×á ÀöÏüÇÞ, HTTP ÏôÓË ×üÄ? User-AgentÏÅ Å?Æ? Ø?ÀöÊ?Ì?È? ÌÃÑ?×áÄé. ÄéÐÍ ÅÞ ÑéÐÊ ÀÀÄé:

BrowserMatchNoCase Robot is_a_robot
SetEnvIfNoCase User-Agent Robot is_a_robot

ÓïÀÅ ÏÉÑ?:

BrowserMatch ^Mozilla forms jpeg=yes browser=netscape
BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript
BrowserMatch MSIE !javascript

top

BrowserMatchNoCase Ñ?ÍÓÎþ

ÌÃÈý:ÄûÌâÉ?ÐêÈ? ÁÈÊÀ×ßÑ?ÎÚÀý User-AgentÏÅ Å?Æ? Ø?ÀöÊ?Ì?È? ÌÃÑ?×áÄé
É?É:BrowserMatchNoCase regex [!]env-variable[=value] [[!]env-variable[=value]] ...
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?, directory, .htaccess
Override ÏÙÌ×:FileInfo
Ë?ÕÒ:Base
È?Åò:mod_setenvif

BrowserMatchNoCase Ñ?ÍÓÎþÄÒ BrowserMatch Ñ?ÍÓÎþÏÝ Ð×ÉÜË? ÀÀÄé. ÁçÇ?Ã? ÐÜ Ñ?ÍÓÎþÄÒ ÄûÌâÉ?ÐêÈ? ÁÈÊÀ×ßÑ?ÎÚÄÒÄé. ÏÉÈ? ÅùÎþ:

BrowserMatchNoCase mac platform=macintosh
BrowserMatchNoCase win platform=windows

BrowserMatchÏÝ BrowserMatchNoCase Ñ?ÍÓÎþÄÒ SetEnvIfÏÝ SetEnvIfNoCase Ñ?ÍÓÎþÐ× Ö?ÊÀ×á ÀöÏüÄé. ÄéÐÍ Ñæ ÑéÐÊ ÀÀÄé:

BrowserMatchNoCase Robot is_a_robot
SetEnvIfNoCase User-Agent Robot is_a_robot

top

SetEnvIf Ñ?ÍÓÎþ

ÌÃÈý:ÏôÓËÐ× ÌÊÑ?ÏÅ Å?Æ? Ø?ÀöÊ?Ì?È? ÌÃÑ?×áÄé
É?É:SetEnvIf attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?, directory, .htaccess
Override ÏÙÌ×:FileInfo
Ë?ÕÒ:Base
È?Åò:mod_setenvif

SetEnvIf Ñ?ÍÓÎþÄÒ ÏôÓËÐ× ÌÊÑ?ÏÅ Å?Æ? Ø?ÀöÊ?Ì?È? Ñ?Ð××áÄé. ÓÉÉ?ÒÀ ÎÖÁäÈåÖ? attributeÄÒ ÄéÐÍ ÌÌÀÅÑ?Ñï ×ßÃ?Äé:

  1. HTTP ÏôÓË ×üÄ? (Ä? ÐêÌÌ×á Ñ?ÊÈÄÒ RFC2616 Ò?Àý); ÏÉÈ? ÅùÎþ: Host, User-Agent, Referer, Accept-Language. Ñ?Áä×?×?ÍÔÐË Ë÷Ïû×ßÏ? Ï?Ç? ÏôÓË ×üÄ?È? Ñ?Ô?×â Ì? ÐæÄé.
  2. ÏôÓËÐ× ÄéÐÍ ÌÊÑ?Ñï ×ßÃ?:
    • Remote_Host - (ÐæÄéÈù) ÏôÓË×ßÄÒ Õ?Æ?ÐÜÎ?Ö?Ð× Ø?ÍÊÖ?Èý
    • Remote_Addr - ÏôÓË×ßÄÒ Õ?Æ?ÐÜÎ?Ö?Ð× IP ÑæÌâ
    • Server_Addr - ÏôÓËÐË ÉîÄÒ Ì-É?Ð× IP ÑæÌâ (2.0.43 É?Ð? ÐÜØÔÏÅÈÈ)
    • Request_Method - Ë÷Ïû×á ÈîÍñÅõ ÐÜÈ? (GET, POST, ÅþÅþ)
    • Request_Protocol - ÏôÓËÐ× ×ÑÇÞÕôÔí ÐÜÈ?À? É?Ð? (ÏÉÈ? ÅùÎþ, "HTTP/0.9", "HTTP/1.1", Åþ.)
    • Request_URI - HTTP ÏôÓËÏÅÌ- ÏôÓË×á ÐêÏ? -- ÐßÉíÐ?ÐÈÇÞ URLÏÅÌ- Ñ?Ð×É?ÐêÏ-ÐË Ñ?Ïì×á ÍÊÕÄ(scheme)À? Ø?ÍÊÖ? ÐÜØÔ ÊÞÊà
  3. ÏôÓËÀ? Ï?À?ÅØ Ø?ÀöÊ?Ì? ÐÜÈ?. ÁçÇÅÌ- SetEnvIf Ñ?ÍÓÎþÄÒ ÐÜÐ? Ñ?ÍÓÎþÐ× ÀñÀ?È? ÀÛË÷×â Ì? ÐæÄé. ÐÜÐ?ÏÅ SetEnvIf[NoCase] Ñ?ÍÓÎþÇÞ Ñ?Ð××á Ø?ÀöÊ?Ì?ÈÈÐË ÀÛË÷×â Ì? ÐæÄé. 'ÐÜÐ?'ÐÜÆ? (Ì-É?Ð?Ï?À? ÀÀÐÜ) Ä? ÃàÐÊ ÏÅÏ? Ø?ÐÊ Ñ?ÍÓÎþÐ× ×?Ð÷ ÏÅÏ? ÐÜÐ?ÐË Æö×áÄé. ÏôÓË ÌÊÑ?ÐÜ ÎÖÄßÀý Ñ?Áä×?×?ÍÔÐÜ ÎÖÄá attributeÄÒ Ø?ÀöÊ?Ì?ÇÞ ÓûÁî×áÄé.

ÅÞÉ?ÒÀ ÎÖÁäÈåÖ?ÄÒ (regex) Perl Ø?Ø? Ñ?Áä×?×?ÍÔÐÜÄé. ÐÜÄÒ POSIX.2 egrepÐ× Ñ?Áä×?×?ÍÔÀ? ÊåÍÑ×ßÄé. regexÀÅ attributeÏÅ ÄûÐÐ×ßÈù Ã?ÈãÑ? ÎÖÁäÈåÖ?È? ÓÃÈ?×áÄé.

Ã?ÈãÑ? ÎÖÁäÈåÖ?ÄÒ ÌÃÑ?×â Ê?Ì?ÈýÀ? (ÌÁÕÓÐ?ÐÞ) ÌÃÑ?À?ÅùÐÜÄé. ÄéÐÍÀ? ÀÀÐÊ ×?ÍÔÐÜÄé

  1. varname, Ø?ÐÊ
  2. !varname, Ø?ÐÊ
  3. varname=value

ÓÉÉ?ÒÀ ×?ÕÒÄÒ À?ÐÈÇÞ "1"ÐË Ë÷Ïû×áÄé. ÅÞÉ?ÒÀ ×?ÕÒÄÒ Ê?Ì?ÀÅ ÐÜÉÜ Ñ?Ð×ÅØ ÀöÏü Ê?Ì?È? Ñ?ÀÕ×ßÀý, ÌÌÉ?ÒÀÄÒ Ê?Ì?Ð× À?ÐÈÇÞ valueÈ? ÌÃÑ?×áÄé. ÎÖÖÔÔÅ 2.0.51ÊÞÕÝ valueÏÅ ÐæÄÒ $1..$9È? regexÐ× ÀØ?Ô? ×ßÐ?×?×?ÍÔÐÈÇÞ ÄûÓÌ×áÄé.

ÏÉÑ?:

SetEnvIf Request_URI "\.gif$" object_is_image=gif
SetEnvIf Request_URI "\.jpg$" object_is_image=jpg
SetEnvIf Request_URI "\.xbm$" object_is_image=xbm
:
SetEnvIf Referer www\.mydomain\.com intra_site_referral
:
SetEnvIf object_is_image xbm XBIT_PROCESSING=1
:
SetEnvIf ^TS* ^[a-z].* HAVE_TS

ÓÃÐÍ ÌÌ ÑéÐÊ ÐÜÉÜÑ? ÖÔÐßÐË ÏôÓË×á ÀöÏü Ø?ÀöÊ?Ì? object_is_imageÈ? ÌÃÑ?×áÄé. ÃçÉ?ÒÀ ÑéÐÊ ÖôÐÜÑ?È? www.mydomain.com Ð?Ë÷ÐÜÖ?ÏÅÌ- Ò?ÑÆ×á ÀöÏü intra_site_referralÐË ÌÃÑ?×áÄé.

ÈÆÑ?ÈÇ ÏÉÄÒ ÏôÓËÏÅ ÐÜÈ?ÏÅ "TS"ÇÞ ÍÓÐë×ßÀý À?ÐÜ [a-z] Ñï ×ßÃ?ÇÞ ÍÓÐë×ßÄÒ ×üÄ?ÀÅ ÐæÄÒ ÀöÏü Ø?ÀöÊ?Ì? HAVE_TSÈ? ÌÃÑ?×áÄé.

Ò?Àý

top

SetEnvIfNoCase Ñ?ÍÓÎþ

ÌÃÈý:ÄûÌâÉ?ÐêÈ? ÁÈÊÀ×ßÑ?ÎÚÀý ÏôÓËÐ× ÌÊÑ?ÏÅ Å?Æ? Ø?ÀöÊ?Ì?È? ÌÃÑ?×áÄé
É?É:SetEnvIfNoCase attribute regex [!]env-variable[=value] [[!]env-variable[=value]] ...
Ë÷ÏûÐõÌâ:ÑæÌ-É?ÌÃÑ?, ÀÅË?Ø?ÍÊÖ?, directory, .htaccess
Override ÏÙÌ×:FileInfo
Ë?ÕÒ:Base
È?Åò:mod_setenvif

SetEnvIfNoCaseÄÒ Ð×ÉÜË? SetEnvIf Ñ?ÍÓÎþÏÝ ÀÀÑ?ÈÈ, ÄûÌâÉ?ÐêÈ? ÁÈÊÀ×ßÑ?ÎÚÀý Ñ?Áä×?×?ÍÔÐË Ó?ÄÒÄé. ÏÉÈ? ÅùÎþ:

SetEnvIfNoCase Host Apache\.Org site=apache

ÐÜ ÀöÏü HTTP ÏôÓË ×üÄ? Host:ÀÅ Apache.Org, apache.org ÅþÐË Ö?×ä×ßÈù site Ø?ÀöÊ?Ì?È? "apache"ÇÞ ÌÃÑ?×áÄé.

ÀÅÄÙ×á Î?Îþ:  en  |  ja  |  ko  |  tr 

top

Comments

Notice:
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 mailing lists.