Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ
îðèãèíàëüíîãî äîêóìåíòà
: http://www.arcetri.astro.it/manual/ko/urlmapping.html
Äàòà èçìåíåíèÿ: Mon Jan 21 19:44:30 2013 Äàòà èíäåêñèðîâàíèÿ: Fri Feb 28 00:35:43 2014 Êîäèðîâêà: ISO8859-5 Ïîèñêîâûå ñëîâà: ï ï ï ï ï ï ï ï ï ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï |
Apache HTTP Server Version 2.2
ÐÜ É?Ì-ÄÒ ÏôÓËÐ× URLÐË ÀÅÑ?Àý ÎÖÖÔÔÅÀÅ ÎþÆËÀä Ì-ÊåÍÊ×â ÖÔÐßÐ× ÖÔÐßÍÓÍÊÕëË? Ð?ÔÅÈ? Ó?ÄÒÑ? ÌÃÈý×áÄé.
À?ÇÓÅØ È?Åò | À?ÇÓÅØ Ñ?ÍÓÎþ |
---|---|
ÏôÓËÐË ÉîÐÊ ÎÖÖÔÔÅÄÒ ÎþÆ ÖÔÐßÐË Ì-ÊåÍÊ×âÑ? ÀñÑ?×ßÁòÐ?×è
ÁòÊËÐ?ÐÈÇÞ ÏôÓËÐ× URL-ÀöÇÞ(URLÏÅÌ- Ø?ÍÊÖ?ÈýÀ? Ö?Ö? ÅêÏÅ
Ã?ÏÐÄÒ ÊÞÊà)È? ÌÃÑ?ÖÔÐßÏÅÌ- Ñ?Ñ?×á DocumentRoot
ÅêÏÅ ÊéÐÞÄé. ÁçÇÅÌ-
DocumentRoot
ÎÖÇÅÐæÄÒ
ÖÔÐßÀ? Å?ÇÊÕôÈ?ÅùÐÊ Ð?ÏÅÌ- ÊÈÀäÅÙ ÁòÊËÐ?ÐÞ ÃËÏûÐÜÄé.
ÑÎÑÎ ÖÔÐßÍÓÍÊÕëÏÅÌ- DocumentRoot
ÎÖÇÅ ÐæÑ?ÎÚÐÊ ÊÞÊàÐË
Ð?ÏÅÌ- Ñ?Áé×â ×ÚÏôÀÅ ÐæÄé. ÎÖÖÔÔÅÄÒ ÐÜ ÀöÏü Ï?Ç?ÀÅÑ? ÉöÉÐË
Ë÷Ïû×â Ì? ÐæÄé. Ð?ÄàÍÊ ÍÓÍÊÕëÏÅÌ- ÍÙÊÌÈÅÕ?È? Ë÷Ïû×ßÏ?
ÖÔÐßÍÓÍÊÕëÐ× ÄéÈ? ÊÞÊàÐË DocumentRoot
ÎÖÇÅÏÅ Åá Ì? ÐæÄé.
ÊÈÎØÐË Ð?×è ÎÖÖÔÔÅÄÒ ×èÄ÷ Å?ÇÊÕôÈ?Ð× Options
ÌÃÑ?ÏÅ
FollowSymLinks
Ã?
SymLinksIfOwnerMatch
ÀÅ ÐæÄÒ ÀöÏüÏÅÈÈ ÍÙÊÌÈÅÕ?È?
Å?Æ?À?Äé.
Æ×, Alias
Ñ?ÍÓÎþÄÒ ÖÔÐßÍÓÍÊÕëÐ× Ö?Ñ? ÊÞÊàÐË Ð?À?À?ÏÅ ÄûÐÐ×áÄé. ÏÉÈ?
ÅùÎþ ÄéÐÍÀ? ÀÀÄéÈù
Alias /docs /var/web
URL http://www.example.com/docs/dir/file.html
ÐÊ
/var/web/dir/file.html
ÐË ÀÅÑ?Àý Ì-ÊåÍÊ×áÄé.
Ñ?Ñ?×á ÀöÇÞÏÅ ÐæÄÒ È?Å÷ ÃËÏûÐË CGI ÍÊÕ?ÈÃÖ?ÇÞ ÓûÁî×ßÄÒ ÀÝÐË
Ñ?Ïì×ßÀýÄÒ ScriptAlias
Ñ?ÍÓÎþÅÅ ÀÀÐÊ ÐßÐË ×áÄé.
AliasMatch
ÏÝ
ScriptAliasMatch
Ñ?ÍÓÎþÐ× À-ÇÒ×á Ñ?Áä×?×?ÍÔÁòÉí ÄûÐÐÀ? ÄûÔÅÈ? Ë÷Ïû×ßÏ? Ä?
Ð?Ï?×á ÌÃÑ?ÐÜ ÀÅÄÙ×ßÄé. ÏÉÈ? ÅùÎþ,
ScriptAliasMatch ^/~([a-zA-Z0-9]+)/cgi-bin/(.+)
/home/$1/cgi-bin/$2
ÄÒ http://example.com/~user/cgi-bin/script.cgi
ÇÞÐ×
ÏôÓËÐË ÀöÇÞ /home/user/cgi-bin/script.cgi
ÇÞ
ÄûÐÐ×ßÀý, ×èÄ÷ ÖÔÐßÐË CGI ÍÊÕ?ÈÃÖ?ÇÞ ÓûÁî×áÄé.
Ð?ÄàÍÊ ÍÓÍÊÕëÐÊ Ð?ÕûÐ?ÐÈÇÞ Ö?Ñ? Ë÷ÏûÐê userÐ×
Ø?Å?ÇÊÕôÈ?È? ~user/
ÇÞ Ñ?Ô?×áÄé.
mod_userdir
È?ÅòÐÊ ÐÜ ÀÃÃôÐË Ð?ÏÅÁþÑ?
Ø?Ðõ×ßÏ?, ÄéÐÍÀ? ÀÀÐÊ URLÐË ÀÅÑ?Àý À? Ë÷ÏûÐê Ø?Å?ÇÊÕôÈ?
ÎØÏÅ ÐæÄÒ ÖÔÐßÐË Ì-ÊåÍÊ×áÄé.
http://www.example.com/~user/file.html
ÊÈÎØË? Ð?ÏÅÌ- Ë÷ÏûÐê Ø?Å?ÇÊÕôÈ?ÇÞ Ñ?Ñ? Ñ?Áé×â Ì? ÐæÐÈÈù
ÎØÅØÄé. ÁçÇÅÌ- UserDir
Ñ?ÍÓÎþÄÒ Ë÷ÏûÐê Ø?Å?ÇÊÕôÈ?ÏÅÌ- Ð?Ïû ÖÔÐßÅùÐÜ ÐæÐË Å?ÇÊÕôÈ?È?
Ñ?Ñ?×áÄé. ÁòÊË ÌÃÑ? Userdir public_html
ÐË Ë÷Ïû×ßÀý
/home/user/
ÀÅ /etc/passwd
ÏÅ Ñ?Ñ?ÅØ
Ë÷ÏûÐê Ø?Å?ÇÊÕôÈ?Æ?Èù, Ð?Ð× URLÐÊ ÖÔÐß
/home/user/public_html/file.html
ÏÅ ÄûÐÐ×áÄé.
Æ×, Userdir
Ñ?ÍÓÎþÄÒ /etc/passwd
ÏÅ
Ø?Å?ÇÊÕôÈ?Ð× Ð?ÔÅÀÅ Ð?ÐõÅ×Ñ?ÎÚÄÒ ÍÓÍÊÕëÐË Ð?×è Ï?Ç? ÄéÈ?
×?ÕÒÈ? Ë÷Ïû×â Ì? ÐæÄé.
ÎþÆ Ë÷Æ?ÐÊ (ÊÈÕû Ð?ÏÅÌ- %7e
ÇÞ ÐÞÔêÅ?Å×ÄÒ)
"~" ÁòØ?ÀÅ ÐÜË?×ßÏ? ÄéÈ? ÉöÍÔÐÈÇÞ Ë÷ÏûÐê Å?ÇÊÕôÈ?È? Ã?ÕÈÃËÀý
ÍÝÎþ×áÄé. ÐÜ ÁòÄÙÐÊ mod_userdirÐÜ Ñ?À?×ßÑ?ÎÚÄÒÄé. ÁçÇ?Ã?
Ë÷ÏûÐê Ø?Å?ÇÊÕôÈ?ÀÅ ÁäÔ?Ð?ÐÞ ÉöÉÐÈÇÞ ÁÈÌÊÅ×ÐæÄéÈù, AliasMatch
Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÏ?
Ï?×ßÄÒ ØÏÀ?È? Î?ÐË Ì? ÐæÄé. ÏÉÈ? ÅùÎþ, ÄéÐÍÐ×
AliasMatch
Ñ?ÍÓÎþÈ? Ë÷Ïû×ßÈù
http://www.example.com/upages/user/file.html
ÐÜ
/home/user/public_html/file.html
ÏÅ ÄûÐÐ×áÄé:
AliasMatch ^/upages/([a-zA-Z0-9]+)/?(.*)
/home/$1/public_html/$2
ÎåÏÅÌ- ÌÃÈý×á ÌÃÑ? Ñ?ÍÓÎþÅùÐÊ ÎÖÖÔÔÅÀÅ ÖÔÐßÍÓÍÊÕëÐ× Ö?Ñ?
ÐõÌâÏÅ ÐæÄÒ ÃËÏûÐË Õ?Æ?ÐÜÎ?Ö?ÏÅÀä ÊÈÃËÀä ÈÈÅ÷Äé. ÁçÇ?Ã?
Æ?Æ?ÇÞ ÏôÓË×á ÃËÏûÐÜ ÄéÈ? URLÏÅ ÐæÄéÀý Õ?Æ?ÐÜÎ?Ö?ÏÅÀä ÎÛÇÑÑæÎþ,
Õ?Æ?ÐÜÎ?Ö?ÀÅ Ë?ÇÞ Áç URLÐË ÏôÓË×ßÅÅÇß ÈÈÅõÄÒ ÀÝÐÜ ÑÑÐË Æ?ÀÅ
ÐæÄé. ÐÜÈ? È?ÄéÐÜÇÊÌ×(redirection)ÐÜÆ?Àý ×ßÈ÷,
Redirect
Ñ?ÍÓÎþÈ?
Ë÷Ïû×áÄé. ÏÉÈ? ÅùÎþ, DocumentRoot
ÎÖÇÅ /foo/
Å?ÇÊÕôÈ?Ð× ÃËÏûÐË Ë?ÇÞ /bar/
Å?ÇÊÕôÈ?ÇÞ ÏÕÀõÄéÈù
ÄéÐÍÀ? ÀÀÐÜ Õ?Æ?ÐÜÎ?Ö?ÀÅ Ë?ÇÞÏþ Ð?ÔÅÈ? ÏôÓË×ßÅÅÇß ×áÄé:
Redirect permanent /foo/
http://www.example.com/bar/
ÁçÇ?Èù www.example.com
Ì-É?Ð× /foo/
ÇÞ
ÍÓÐë×ßÄÒ URL-ÀöÇÞÄÒ /foo/
È? /bar/
ÇÞ
ÉéÂë URLÇÞ È?ÄéÐÜÇÊÌ×ÅØÄé. Õ?Æ?ÐÜÎ?Ö?È? Ï?ÇÅ Ì-É?ÏìÏÅ ÎþÆÂ
ÄéÈ? Ì-É?ÇÞÅÅ È?ÄéÐÜÇÊÌ××â Ì? ÐæÄé.
Æ×, ÎÖÖÔÔÅÄÒ Ä? ÊÉÐò×á Ð÷ÐëÌÊ É?Ñ?È? Ð?×è
RedirectMatch
Ñ?ÍÓÎþÈ? Ñ?À?×áÄé. ÏÉÈ? ÅùÎþ, ÄéÈ? ÏôÓËÐÊ ÁçÄûÇÞ ÅÞÀý Ë÷ÐÜÖ?
Ø?ÖôÐÜÑ?ÏÅ Äû×á ÏôÓËÈÈÐË ÄéÈ? Ë÷ÐÜÖ?ÇÞ È?ÄéÐÜÇÊÌ××ßÇÑÈù:
RedirectMatch permanent ^/$
http://www.example.com/startpage.html
ÐãÍÓÇÞ Ë÷ÐÜÖ?Ð× È?Å÷ ÖôÐÜÑ?È? ÄéÈ? Ë÷ÐÜÖ?Ð× Ö?Ñ? ÖôÐÜÑ?ÇÞ È?ÄéÐÜÇÊÌ××ßÇÑÈù:
RedirectMatch temp .*
http://othersite.example.com/startpage.html
ÎÖÖÔÔÅÄÒ ÄéÈ? Ì-É?ÏÅ ÐæÄÒ É?Ì-È? Ì-É?Ð× URL À?À?ÐÈÇÞ ÀÅÑ?ÏÓ Ì? ÐæÄé. ÐÜ ÀöÏü Ð?Ì-É?ÀÅ Ï?Àí Ì-É?ÏÅÌ- É?Ì-È? ÀÅÑ?ÏÝÌ- Õ?Æ?ÐÜÎ?Ö?ÏÅÀä Ð?Äî×ßÄÒ ×ÑÇßÍÓ Ì-É?ÏÝ ÀÀÐÜ ÅÏÐë×ßÁòÆ?É?ÏÅ ÐÜÇÁ ÉöÉÐË Ï?×ÑÇßÍÓ(reverse proxying)Æ?Àý ×áÄé. Õ?Æ?ÐÜÎ?Ö?Ð× ÐäÐõÏÅÌ- Ï?×ÑÇßÍÓ Ì-É?ÀÅ É?Ì-È? ÊÈÃËÑæÄÒ ÀÝÓÃÇà ÊÈÐÜÉ×ÇÞ ÐßÉí ×ÑÇßÍÓÏÝÄÒ ÄéÈ?Äé.
ÎÖÇÅ ÌÃÑ?ÏÅÌ- Õ?Æ?ÐÜÎ?Ö?ÀÅ /foo/
ÏÅ ÐæÄÒ É?Ì-È?
ÏôÓË×ßÈù, Ì-É?ÄÒ internal.example.com
Ð×
/bar/
Å?ÇÊÕôÈ?ÏÅÌ- É?Ì-È? ÀÅÑ?ÏÝÌ- É?Ì-ÀÅ ÈÆÔÅ
Ì-É?ÏÅ ÐæÎ?Ä? ÀÝÓÃÇà Õ?Æ?ÐÜÎ?Ö?ÏÅÀä ÊÈÃÍÄé.
ProxyPass /foo/ http://internal.example.com/bar/
ProxyPassReverse /foo/ http://internal.example.com/bar/
ProxyPass
ÄÒ Ì-É?ÀÅ
Ð?Ð×á É?Ì-È? ÀÅÑ?ÏÐÅÅÇß ÌÃÑ?×ßÈ÷, ProxyPassReverse
Ñ?ÍÓÎþÄÒ
internal.example.com
ÐÜ ÊÈÃËÄÒ È?ÄéÐÜÇÊÌ×ÐË Ð÷ÐëÌÊ×ßÏ?
È?ÄéÐÜÇÊÌ×ÐÜ ×?Ð÷ Ì-É?Ð× Ð?Ð×á Å?ÇÊÕôÈ?È? ÀÅÈ?ÕÀÅÅÇß ×áÄé.
Æ×, ProxyPassReverseCookieDomain
À?
ProxyPassReverseCookieDomain
ÐÊ
ÀÀÐÊ ÉöÉÐÈÇÞ Ï?ÇÅ Ì-É?ÀÅ ÊÈÃÍ ÔýÕÀÈ? Ð÷ÐëÌÊ×áÄé.
ÁçÇ?Ã? É?Ì- ÎØÏÅ ÐæÄÒ ÈÅÕ?ÄÒ Ð÷ÐëÌÊ×ßÑ? ÎÚÐÍÐË ÑæÐ××ßÆ?.
internal.example.com
ÏÅ Äû×á ÐÄûÈÅÕ?ÄÒ Õ?Æ?ÐÜÎ?Ö?ÀÅ
×ÑÇßÍÓÌ-É?ÀÅ ÎÖÄßÆ? internal.example.com
ÐÈÇÞ Ñ?Ñ?
ÏôÓË×ßÀä ×áÄé. Ñ?ËÿÐêÀÅ ÈÈÅ÷ mod_proxy_html
È?ÅòÐË Ë÷Ïû×ßÏ? HTMLÀ? XHTMLÏÅ ÐæÄÒ ÈÅÕ?È? Ð÷ÐëÌÊ×â Ì? ÐæÄé.
Ä? À-ÇÒ×á ÔÅØ?ÐÜ ×ÚÏô×âÆ? mod_rewrite
Ð×
Ð÷ÐëÌÊ Ï?Ñ?ÐÜ ÅÅÏ?ÐÜ ÅØÄé. ÐÜ È?ÅòÐ× Ñ?ÍÓÎþÄÒ ÊúÆ?ÏüÐ? ÑÎÇ?Ã?
Õ?Æ?ÐÜÎ?Ö?Ð× IP ÑæÌâ Åþ ÏôÓËÐ× Ö?ÒÅÐË ÀÅÑ?Àý ÎþÅ?ÏÅ ÐæÄÒ
ÃËÏûÐË Ì-ÊåÍÊ×âÑ? ÀñÑ?×â Ì? ÐæÄé. Æ×, mod_rewriteÄÒ ÏôÓËÐË
ÎþÆËÀä ÓÃÈ?×âÑ? ÀñÑ?×ßÁòÐ?×è ÏìÊÞ Å?ÐÜÕÝÊ?ÐÜÍÊ ÖÔÐßÐÜÃ?
×ÑÇÞÁçÇ?ÐË Ë÷Ïû×â Ì? ÐæÄé. Ð÷ÐëÌÊ Ï?Ñ?ÐÊ Ð?ÏÅÌ- ÄéÇù ÌÌ
ÑÎÇ? ÄûÐÐ, Ñÿ, ÃËÊÞ È?ÄéÐÜÇÊÌ× (alias), ÏìÊÞ È?ÄéÐÜÇÊÌ×,
×ÑÇßÍÓ, È?ÅÞÈ? Ñ?Ï?×áÄé. mod_rewriteÈ? Ë÷Ïû×ßÄÒ Í×Ñ? ÏÉÄÒ
URL Ñ?ÐëÌÊ Ñ?Ô?Ì-ÏÅÌ-
ÌÃÈý×áÄé.
ÀñÁÉ ÏôÓË×á URLÏÅ ÄûÐÐ×ßÄÒ ÖÔÐßÐË ÖÔÐßÍÓÍÊÕëÏÅÌ- Ó?Ñ? È?×á ÀöÏüÐÜÄé. Ï?Ç? ÀÅÑ? ÐÜÐ?ÀÅ ÐæÄé. ÎþÆ ÀöÏü É?Ì-È? ÄéÈ? À?ÐÈÇÞ ÏÕÀõÁò Æ?É?Ðß Ì? ÐæÄé. ÐÜ ÀöÏü Õ?Æ?ÐÜÎ?Ö?ÏÅÀä URL È?ÄéÐÜÇÊÌ×ÐÈÇÞ ÐêÏ?Ð× Ë?ÇÞÏþ Ð?ÔÅÈ? ÎÛÇÑÑæÄÒ ÉöÉÐÜ Ñ?Ðß ÑÑÄé. ÁçÇ?Èù ÐêÏ?ÐË ÏÕÀìÅÅ ÏÐÇÅÅØ ÊßÈÆÕ?Ã? ÈÅÕ?ÀÅ ÀøÌã Ð?ØÏ×ßÄé.
"File Not Found" ÏÐÇ?Ð× ÄéÈ? ÐßÉíÐ?ÐÞ Ï?ÐÞÐÊ ÊúÆ?ÏüÐ?ÏÅ
Ñ?Ñ? Ø?ÐÊ HTML ÈÅÕ?ÏÅ URLÐÜ ÐïÈ? ÐäÇÒÅØ ÀöÏüÐÜÄé. ÎÖÖÔÔÅÄÒ
mod_speling
(ÈÒÓóÉÐÜ ÖÂÈ?Ñ? ÎÚÎâÐÍ) È?ÅòÇÞ
ÐÜÏÝ ÀÀÐÊ É?Ñ?È? ÅÍÄÒÄé. ÐÜ È?ÅòÐË Ë÷Ïû×ßÈù "File Not Found"
ÏÐÇ?ÀÅ ÉïË×ßÄÒ ÀöÏü ÊåÍÑ×á ÖÔÐßÈýÐË ÀÅÑ? ÐêÏ?ÐË Ó?ÄÒÄé.
ÈÈÎð ÉïÀï×ßÈù mod_spelingÐÊ Õ?Æ?ÐÜÎ?Ö?È? ÏÓÉéÈ? Ð?ÔÅÇÞ
HTTP È?ÄéÐÜÇÊÌ××áÄé. "ÊåÍÑ×á" ÖÔÐßÐÜ Ï?Ç?Àà ÐæÄéÈù
Õ?Æ?ÐÜÎ?Ö?ÏÅÀä ÈåÇßÐË ÊÈÃÍÄé.
mod_spelingÐ× Ö?Ø? Ð?Ïû×á ÐõÑÅÐÊ ÄûÌâÉ?ÐêÈ? ÁÈÊÀ×ßÑ?ÎÚÀý ÖÔÐßÈýÐË ÊåÁÃ×ßÄÒ ÁòÄÙÐÜÄé. ÁçÇÅÌ- Ð?ÄàÍÊ ÖÔÐßÍÓÍÊÕëÀ? URLÐ× ÄûÌâÉ?Ðê ÌÊÑ?ÐË ÎÛÑ?È?×ßÄÒ Ë÷ÏûÐêÀÅ ÐæÄÒ ÍÓÍÊÕëÏÅ ÅÅÏ?ÐÜ ÅØÄé. ÁçÇ?Ã? mod_spelingÐÜ ÐêÑæ URLÐË ÀýÓÔÎï×áÄéÈù, "ÐïÈ?ÅØ" ÏôÓËÆ?ÈÆÄé URL È?ÄéÐÜÇÊÌ×À? Õ?Æ?ÐÜÎ?Ö?Ð× Ë?ÇÞÏþ ÏôÓËÐÜ ÐßÎþÃ?É×ÇÞ Ì-É?ÏÅ ÊÞÄóÐÜ ÅØÄé.
Ó?ÄÒ ÍÓÅÅÀÅ È?ÅÞ Í×Öà×ßÈù ÎÖÖÔÔÅÄÒ HTTP status code 404
(file not found) ÏÐÇ?ÖôÐÜÑ?È? ÊÈÃÍÄé. ÐÜ ÖôÐÜÑ?Ð× ÃËÏûÐÊ
ErrorDocument
Ñ?ÍÓÎþÇÞ
ÑÆÐ×ßÈ÷, Ë÷ÏûÐêÑ?Ð× ÏÐÇ? ÐÐÄô
É?Ì-È? Ò?Àý×ßÏ? Ë÷ÏûÐêÑ?Ð××â Ì? ÐæÄé.