Äîêóìåíò âçÿò èç êýøà ïîèñêîâîé ìàøèíû. Àäðåñ îðèãèíàëüíîãî äîêóìåíòà : http://itpm.msu.su/manual/ko/urlmapping.html
Äàòà èçìåíåíèÿ: Sat Feb 5 01:50:17 2005
Äàòà èíäåêñèðîâàíèÿ: Mon Oct 1 21:29:30 2012
Êîäèðîâêà: ISO8859-5

Ïîèñêîâûå ñëîâà: ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï ï ð ï
URLÐË ÖÔÐßÍÓÍÊÕë <b style="color:black;background-color:#66ffff">Ð</b>?ÔÅÇÞ ÄûÐÐ×ßÁò - Apache HTTP Server
<-
Apache > HTTP Server > Documentation > Version 2.0

URLÐË ÖÔÐßÍÓÍÊÕë Ð?ÔÅÇÞ ÄûÐÐ×ßÁò

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

ÐÜ É?Ì-ÄÒ ÏôÓËÐ× URLÐË ÀÅÑ?Àý ÎÖÖÔÔÅÀÅ ÎþÆËÀä Ì-ÊåÍÊ×â ÖÔÐßÐ× ÖÔÐßÍÓÍÊÕëË? Ð?ÔÅÈ? Ó?ÄÒÑ? ÌÃÈý×áÄé.

top

À?ÇÓÅØ È?ÅòÀ? Ñ?ÍÓÎþÅù

top

DocumentRoot

ÏôÓËÐË ÉîÐÊ ÎÖÖÔÔÅÄÒ ÎþÆ ÖÔÐßÐË Ì-ÊåÍÊ×âÑ? ÀñÑ?×ßÁòÐ?×è ÁòÊËÐ?ÐÈÇÞ ÏôÓËÐ× URL-ÀöÇÞ(URLÏÅÌ- Ø?ÍÊÖ?ÈýÀ? Ö?Ö? ÅêÏÅ Ã?ÏÐÄÒ ÊÞÊà)È? ÌÃÑ?ÖÔÐßÏÅÌ- Ñ?Ñ?×á DocumentRoot ÅêÏÅ ÊéÐÞÄé. ÁçÇÅÌ- DocumentRoot ÎÖÇÅÐæÄÒ ÖÔÐßÀ? Å?ÇÊÕôÈ?ÅùÐÊ Ð?ÏÅÌ- ÊÈÀäÅÙ ÁòÊËÐ?ÐÞ ÃËÏûÐÜÄé.

top

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 ÍÊÕ?ÈÃÖ?ÇÞ ÓûÁî×áÄé.

top

Ë÷ÏûÐê Å?ÇÊÕôÈ?

Ð?ÄàÍÊ ÍÓÍÊÕëÐÊ Ð?ÕûÐ?ÐÈÇÞ Ö?Ñ? Ë÷ÏûÐê 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

top

URL È?ÄéÐÜÇÊÌ×(Redirection)

ÎåÏÅÌ- ÌÃÈý×á ÌÃÑ? Ñ?ÍÓÎþÅùÐÊ ÎÖÖÔÔÅÀÅ ÖÔÐßÍÓÍÊÕëÐ× Ö?Ñ? ÐõÌâÏÅ ÐæÄÒ ÃËÏûÐË Õ?Æ?ÐÜÎ?Ö?ÏÅÀä ÊÈÃËÀä ÈÈÅ÷Äé. ÁçÇ?Ã? Æ?Æ?ÇÞ ÏôÓË×á ÃËÏûÐÜ ÄéÈ? 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

top

Ï?×ÑÇßÍÓ(Reverse Proxy)

ÎÖÖÔÔÅÄÒ ÄéÈ? Ì-É?ÏÅ ÐæÄÒ É?Ì-È? Ì-É?Ð× 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ÐÜ ÊÈÃËÄÒ È?ÄéÐÜÇÊÌ×ÐË Ð÷ÐëÌÊ×ßÏ? È?ÄéÐÜÇÊÌ×ÐÜ ×?Ð÷ Ì-É?Ð× Ð?Ð×á Å?ÇÊÕôÈ?È? ÀÅÈ?ÕÀÅÅÇß ×áÄé. ÁçÇ?Ã? É?Ì- ÎØÏÅ ÐæÄÒ ÈÅÕ?ÄÒ Ð÷ÐëÌÊ×ßÑ? ÎÚÐÍÐË ÑæÐ××ßÆ?. internal.example.comÏÅ Äû×á ÐÄûÈÅÕ?ÄÒ Õ?Æ?ÐÜÎ?Ö?ÀÅ ×ÑÇßÍÓÌ-É?ÀÅ ÎÖÄßÆ? internal.example.comÐÈÇÞ Ñ?Ñ? ÏôÓË×ßÀä ×áÄé.

top

Ð÷ÐëÌÊ Ï?Ñ? (Rewriting Engine)

Ä? À-ÇÒ×á ÔÅØ?ÐÜ ×ÚÏô×âÆ? mod_rewriteÐ× Ð÷ÐëÌÊ Ï?Ñ?ÐÜ ÅÅÏ?ÐÜ ÅØÄé. ÐÜ È?ÅòÐ× Ñ?ÍÓÎþÄÒ ÊúÆ?ÏüÐ? ÑÎÇ?Ã? Õ?Æ?ÐÜÎ?Ö?Ð× IP ÑæÌâ Åþ ÏôÓËÐ× Ö?ÒÅÐË ÀÅÑ?Àý ÎþÅ?ÏÅ ÐæÄÒ ÃËÏûÐË Ì-ÊåÍÊ×âÑ? ÀñÑ?×â Ì? ÐæÄé. Æ×, mod_rewriteÄÒ ÏôÓËÐË ÎþÆËÀä ÓÃÈ?×âÑ? ÀñÑ?×ßÁòÐ?×è ÏìÊÞ Å?ÐÜÕÝÊ?ÐÜÍÊ ÖÔÐßÐÜÃ? ×ÑÇÞÁçÇ?ÐË Ë÷Ïû×â Ì? ÐæÄé. Ð÷ÐëÌÊ Ï?Ñ?ÐÊ Ð?ÏÅÌ- ÄéÇù ÌÌ ÑÎÇ? ÄûÐÐ, Ñÿ, ÃËÊÞ È?ÄéÐÜÇÊÌ× (alias), ÏìÊÞ È?ÄéÐÜÇÊÌ×, ×ÑÇßÍÓ, È?ÅÞÈ? Ñ?Ï?×áÄé. mod_rewriteÈ? Ë÷Ïû×ßÄÒ Í×Ñ? ÏÉÄÒ URL Ñ?ÐëÌÊ Ñ?Ô?Ì-ÏÅÌ- ÌÃÈý×áÄé.

top

File Not Found

ÀñÁÉ ÏôÓË×á 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 Ñ?ÍÓÎþÇÞ ÑÆÐ×ßÈ÷, Ë÷ÏûÐêÑ?Ð× ÏÐÇ? ÐÐÄôÀ? ÄéÁÉÎþ Ì-É? ÏÐÇ?É? É?Ì-È? Ò?Àý×ßÏ? Ë÷ÏûÐêÑ?Ð××â Ì? ÐæÄé.

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