{"id":5676,"date":"2018-06-22T11:15:55","date_gmt":"2018-06-22T08:15:55","guid":{"rendered":"https:\/\/hackware.ru\/?p=5676"},"modified":"2020-10-20T18:28:16","modified_gmt":"2020-10-20T15:28:16","slug":"%d0%bf%d0%be%d0%bb%d0%bd%d0%be%d0%b5-%d1%80%d1%83%d0%ba%d0%be%d0%b2%d0%be%d0%b4%d1%81%d1%82%d0%b2%d0%be-%d0%bf%d0%be-mod_rewrite-%d1%87%d0%b0%d1%81%d1%82%d1%8c-6-%d0%bf%d1%80%d0%be%d0%b4%d0%b2","status":"publish","type":"post","link":"https:\/\/hackware.ru\/?p=5676","title":{"rendered":"\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e mod_rewrite (\u0447\u0430\u0441\u0442\u044c 6): \u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f mod_rewrite"},"content":{"rendered":"<div class=\"576fa40ea81d72e15bb77373cb701737\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-7219829351026140\"\r\n     crossorigin=\"anonymous\"><\/script>\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block; text-align:center;\"\r\n     data-ad-layout=\"in-article\"\r\n     data-ad-format=\"fluid\"\r\n     data-ad-client=\"ca-pub-7219829351026140\"\r\n     data-ad-slot=\"2558585710\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<h2 style=\"text-align: justify;\">\n\t<a href=\"https:\/\/hackware.ru\/?p=5900\"><span style=\"background-color:#FFFF00;\">\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e mod_rewrite<\/span><\/a><br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/hackware.ru\/?p=5485\"><strong>1. \u041a\u0430\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&nbsp;mod_rewrite<\/strong><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/hackware.ru\/?p=5543\"><strong>2. \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f&nbsp;mod_rewrite<\/strong><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<strong><a href=\"https:\/\/hackware.ru\/?p=5564\">3.&nbsp;\u0424\u043b\u0430\u0433\u0438 RewriteRule<\/a><\/strong>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/hackware.ru\/?p=5587\"><strong>4.&nbsp;\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteCond<\/strong><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/hackware.ru\/?p=5645\"><strong>5. \u0427\u0430\u0441\u0442\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f mod_rewrite<\/strong><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"#6\"><strong>6.&nbsp;\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438<\/strong><\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#61\">6.1 \u041f\u043e\u0438\u0441\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0430\u043f\u043a\u0430\u0445<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#62\">6.2 \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#63\">6.3 \u041f\u043e\u043a\u0430\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#64\">6.4 \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u0439 DocumentRoot<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#65\">6.5 \u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#66\">6.6 \u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#67\">6.7 \u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043d\u0430 \u043b\u0435\u0442\u0443<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#68\">6.8 \u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#69\">6.9 \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 Userdirs<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#610\">6.10 \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043d\u043a\u0435\u0440\u043e\u0432<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#611\">6.11 \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#612\">6.12 \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#613\">6.13 \u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0441 mod_rewrite<\/a>\n<\/p>\n<p style=\"margin-left: 80px; text-align: justify;\">\n\t<a href=\"#6131\">6.13.1 \u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u0451\u043d \u0445\u043e\u0441\u0442\u043e\u0432<\/a>\n<\/p>\n<p style=\"margin-left: 80px; text-align: justify;\">\n\t<a href=\"#6132\">6.13.2&nbsp;\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mod_rewrite<\/a>\n<\/p>\n<p style=\"margin-left: 80px; text-align: justify;\">\n\t<a href=\"#6133\">6.13.3&nbsp;\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430<\/a>\n<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\">\n\t<a href=\"#614\">6.14&nbsp;\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 mod_rewrite \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/hackware.ru\/?p=5869\"><strong>7. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteMap<\/strong><\/a>\n<\/p>\n<p style=\"text-align: justify;\">\n\t<strong>8. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteOptions, \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0433\u0434\u0430 \u041d\u0415 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c mod_rewrite<\/strong>\n<\/p>\n<hr \/>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"6\" name=\"6\"><\/a><a id=\"61\" name=\"61\"><\/a>\u041f\u043e\u0438\u0441\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0430\u043f\u043a\u0430\u0445<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u043c\u043e\u0436\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442, \u0438 \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0441\u0443\u0440\u0441 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043a\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e \u0432\u0441\u0435\u043c \u044d\u0442\u0438\u043c \u043f\u0430\u043f\u043a\u0430\u043c. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043c\u044b \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u043f\u0435\u0440\u0435\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0432 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0441\u0442.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0438\u0449\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u0445, \u0438, \u0435\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u0432 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u044d\u0442\u0438\u0445 \u043c\u0435\u0441\u0442, \u043f\u043e\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u043e\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f.\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRewriteEngine on\r\n\r\n#&nbsp;&nbsp; \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0432 \u043f\u0430\u043f\u043a\u0435 dir1\/...\r\n#&nbsp;&nbsp; ...\u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u043b\u0438, \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f:\r\nRewriteCond&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%{DOCUMENT_ROOT}\/dir1\/%{REQUEST_URI}&quot;&nbsp; -f\r\nRewriteRule &quot;^(.+)&quot; &quot;%{DOCUMENT_ROOT}\/dir1\/$1&quot;&nbsp; [L]\r\n\r\n#&nbsp;&nbsp; \u0437\u0430\u0442\u0435\u043c \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u0435\u0433\u043e \u0432 \u043f\u0430\u043f\u043a\u0435 dir2\/...\r\n#&nbsp;&nbsp; ...\u0438 \u0435\u0441\u043b\u0438 \u043d\u0430\u0448\u043b\u0438, \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f:\r\nRewriteCond&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%{DOCUMENT_ROOT}\/dir2\/%{REQUEST_URI}&quot;&nbsp; -f\r\nRewriteRule &quot;^(.+)&quot; &quot;%{DOCUMENT_ROOT}\/dir2\/$1&quot;&nbsp; [L]\r\n\r\n#&nbsp;&nbsp; \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 Alias \u0438\u043b\u0438 ScriptAlias \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432,\r\n#&nbsp;&nbsp; \u0438 \u0442.\u043f.\r\nRewriteRule&nbsp;&nbsp; &quot;^&quot;&nbsp; &quot;-&quot;&nbsp; [PT]<\/pre>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"62\" name=\"62\"><\/a>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0437\u0435\u0440\u043a\u0430\u043b\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430, \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0434\u0435\u0439 \u043d\u0430 \u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0440\u0430\u043d\u0435, \u0433\u0434\u0435 \u043e\u043d\u0438 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430, \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u0438\u0437 \u043a\u0430\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u044b \u043e\u043d\u0438 \u043f\u0440\u0438\u0448\u043b\u0438. \u0415\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0438\u0445 IP-\u0430\u0434\u0440\u0435\u0441\u0443, \u043c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <a href=\"https:\/\/hackware.ru\/?p=5869\" rel=\"noopener noreferrer\" target=\"_blank\">RewriteMap<\/a> \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nHostnameLookups on\r\nRewriteEngine on\r\nRewriteMap&nbsp;&nbsp;&nbsp; multiplex&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;txt:\/path\/to\/map.mirrors&quot;\r\nRewriteCond&nbsp;&nbsp; &quot;%{REMOTE_HOST}&quot;&nbsp; &quot;([a-z]+)$\" [NC]\r\nRewriteRule&nbsp;&nbsp; &quot;^\/(.*)$&quot;&nbsp; &quot;${multiplex:%1|http:\/\/www.example.com\/}$1&quot;&nbsp; [R,L]<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041a\u0430\u0440\u0442\u0430 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u043b\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f (\u0444\u0430\u0439\u043b map.mirrors):\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nde http:\/\/www.example.de\/\r\nuk http:\/\/www.example.uk\/\r\ncom http:\/\/www.example.com\/\r\n##EOF##<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u042d\u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e HostNameLookups \u043d\u0430 on, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0443\u0434\u0430\u0440\u043e\u043c \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteCond \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0447\u0430\u0441\u0442\u044c \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0430 &ndash; \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u044b, \u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 RewriteRule \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u0437\u0435\u0440\u043a\u0430\u043b\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043a\u0430\u0440\u0442\u044b.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"63\" name=\"63\"><\/a>\u041f\u043e\u043a\u0430\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u0438\u043b\u0438 \u0430\u0433\u0435\u043d\u0442\u0430-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 &laquo;User-Agent&raquo; \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0435\u0448\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \u0415\u0441\u043b\u0438 HTTP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a &laquo;User-Agent&raquo; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 &laquo;Mozilla\/3&raquo;, \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 foo.html \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b foo.NS.html, \u0438 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f &laquo;Lynx&raquo; \u0438\u043b\u0438 &laquo;Mozilla&raquo; \u0432\u0435\u0440\u0441\u0438\u0438 1 \u0438\u043b\u0438 2, URL-\u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f foo.20.html. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 foo.32.html. \u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u0430\u0432\u0438\u043b:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRewriteCond &quot;%{HTTP_USER_AGENT}&quot;&nbsp; &quot;^Mozilla\/3.*&quot;\r\nRewriteRule &quot;^foo\\.html$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;foo.NS.html&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [L]\r\n\r\nRewriteCond &quot;%{HTTP_USER_AGENT}&quot;&nbsp; &quot;^Lynx\/&quot; [OR]\r\nRewriteCond &quot;%{HTTP_USER_AGENT}&quot;&nbsp; &quot;^Mozilla\/[12]&quot;\r\nRewriteRule &quot;^foo\\.html$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;foo.20.html&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [L]\r\n\r\nRewriteRule &quot;^foo\\.html$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;foo.32.html&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [L]<\/pre>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"64\" name=\"64\"><\/a>\u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u0439 DocumentRoot<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u044b\u0447\u043d\u043e <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#documentroot\" rel=\"noopener noreferrer\" target=\"_blank\">DocumentRoot<\/a> \u0432\u0435\u0431-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a URL-\u0430\u0434\u0440\u0435\u0441\u0443 &laquo;\/&raquo;. \u041d\u043e \u0447\u0430\u0441\u0442\u043e \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u043c \u0432\u044b\u0441\u0448\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0445\u043e\u0442\u0435\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u0438 \u043f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u043d\u0430 \u0441\u0430\u0439\u0442 \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u0432 \u043f\u043e\u0434\u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \/about\/. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u0430\u0432\u0438\u043b:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c URL \/ \u043d\u0430 \/about\/:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRewriteEngine on\r\nRewriteRule&nbsp;&nbsp; &quot;^\/$&quot;&nbsp; &quot;\/about\/&quot;&nbsp; [R]<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_alias.html#redirectmatch\" rel=\"noopener noreferrer\" target=\"_blank\">RedirectMatch<\/a>:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRedirectMatch &quot;^\/$&quot; &quot;http:\/\/example.com\/about\/&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0422\u0430\u043a\u0436\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 URL. \u0422\u043e \u0435\u0441\u0442\u044c, \u043e\u043d \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 http:\/\/example.com\/, \u043d\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 http:\/\/example.com\/page.html. \u0415\u0441\u043b\u0438 \u0432\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438 \u0441\u0432\u043e\u0439 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 &ndash; \u0442\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 <strong>\u0432\u0435\u0441\u044c <\/strong>\u0432\u0430\u0448 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/core.html#documentroot\" rel=\"noopener noreferrer\" target=\"_blank\">DocumentRoot<\/a> \u0438\u043b\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 \u043e\u0434\u0438\u043d \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0430 \u043d\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0430.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"65\" name=\"65\"><\/a>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u0438\u043d \u0440\u0435\u0441\u0443\u0440\u0441 (\u0441\u043a\u0430\u0436\u0435\u043c, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 index.php) \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0434\u0442\u0438 \u043d\u0430 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441, \u0442\u0430\u043a\u043e\u0439 \u043a\u0430\u043a \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u0444\u0430\u0439\u043b css.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2.2.16 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_dir.html#fallbackresource\" rel=\"noopener noreferrer\" target=\"_blank\">FallbackResource<\/a> \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n&lt;Directory &quot;\/var\/www\/my_blog&quot;&gt;\r\n&nbsp; FallbackResource &quot;index.php&quot;\r\n&lt;\/Directory&gt;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0434\u043d\u0430\u043a\u043e \u0432 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 Apache, \u0438\u043b\u0438 \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b, \u0447\u0435\u043c \u044d\u0442\u043e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n&lt;Directory &quot;\/var\/www\/my_blog&quot;&gt;\r\n&nbsp; RewriteBase &quot;\/my_blog&quot;\r\n\r\n&nbsp; RewriteCond &quot;\/var\/www\/my_blog\/%{REQUEST_FILENAME}&quot; !-f\r\n&nbsp; RewriteCond &quot;\/var\/www\/my_blog\/%{REQUEST_FILENAME}&quot; !-d\r\n&nbsp; RewriteRule &quot;^&quot; &quot;index.php&quot; [PT]\r\n&lt;\/Directory&gt;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0415\u0441\u043b\u0438, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0439 URI \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u0442\u0440\u043e\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 index.php, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c RewriteRule \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRewriteRule &quot;(.*)&quot; &quot;index.php?$1&quot; [PT,QSA]<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044d\u0442\u0438 \u043d\u0430\u0431\u043e\u0440\u044b \u043f\u0440\u0430\u0432\u0438\u043b \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 .htaccess, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0431\u043b\u043e\u043a\u0435 &lt;Directory&gt;.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"66\" name=\"66\"><\/a>\u0420\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u0438\u043a\u0430 \u0440\u0430\u0437\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0438\u043b\u0438 \u043c\u0435\u0441\u0442\u0430\u043c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0448\u0430\u0440\u0434\u0438\u043d\u0433 (&laquo;sharding&raquo;). \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 &laquo;\u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438&raquo; \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043f\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043a \u0446\u0435\u043b\u0435\u0432\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0432\u043e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u0430\u0445 \u043a\u0430\u0440\u0442\u044b. \u041e\u043d\u0438 \u043f\u043e\u0445\u043e\u0436\u0438:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteMap \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043a\u0430\u0440\u0442\u043e\u0439 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0446\u0435\u043b\u0435\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u042d\u0442\u0430 \u043a\u0430\u0440\u0442\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nuser1 physical_host_of_user1\r\nuser2 physical_host_of_user2\r\n: :<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u044d\u0442\u043e \u0432 \u0444\u0430\u0439\u043b <strong>map.users-to-hosts<\/strong>. \u0426\u0435\u043b\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c;\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n\/u\/user1\/anypath<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0441\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nhttp:\/\/physical_host_of_user1\/u\/user\/anypath<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0443\u0442\u044c URL \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0445\u043e\u0441\u0442\u0430. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u0430\u0440\u0442, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f, \u0447\u0442\u043e server0 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0438 \u043d\u0430 \u043a\u0430\u0440\u0442\u0435:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRewriteEngine on\r\nRewriteMap&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; users-to-hosts&nbsp;&nbsp; &quot;txt:\/path\/to\/map.users-to-hosts&quot;\r\nRewriteRule&nbsp;&nbsp; &quot;^\/u\/([^\/]+)\/?(.*)&quot;&nbsp;&nbsp; &quot;http:\/\/${users-to-hosts:$1|server0}\/u\/$1\/$2&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0435 \u044d\u0442\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b \u0441\u043c. \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 <a href=\"https:\/\/hackware.ru\/?p=5869\" rel=\"noopener noreferrer\" target=\"_blank\">RewriteMap<\/a>.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"67\" name=\"67\"><\/a>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043d\u0430 \u043b\u0435\u0442\u0443<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0430 \u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0433\u043e. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e (\u0441\u043a\u0430\u0436\u0435\u043c, \u0447\u0435\u0440\u0435\u0437 <strong>cron<\/strong>), \u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044e.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u042d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u0440\u0430\u0432\u0438\u043b:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\n# \u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439\r\nRewriteCond &quot;%{REQUEST_URI}&quot;&nbsp;&nbsp; &quot;!-U&quot;\r\nRewriteRule &quot;^(.+)\\.html$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;\/regenerate_page.cgi&quot;&nbsp;&nbsp; [PT,L]<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 <strong>-U<\/strong> \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <strong>REQUEST_URI<\/strong>) \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c URL-\u0430\u0434\u0440\u0435\u0441\u043e\u043c. \u041e\u043d \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u043f\u0440\u043e\u0441\u0430 &ndash; \u0442\u043e \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 &ndash; \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 CGI \/regenerate_page.cgi, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0435\u0433\u043e \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0440\u0430\u0437 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043a\u043e\u043f\u0438\u044f.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0434\u043a\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u044e\u0442\u0441\u044f, \u043c\u043e\u0433\u0443\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0432\u0438\u0434\u0435. \u0415\u0441\u043b\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c, \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438 \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043f\u0440\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"68\" name=\"68\"><\/a>\u0411\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0430 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mod_rewrite.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c RewriteMap \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nRewriteEngine on\r\nRewriteMap lb &quot;rnd:\/path\/to\/serverlist.txt&quot;\r\nRewriteRule &quot;^\/(.*)&quot; &quot;http:\/\/${lb:servers}\/$1&quot; [P,L]<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0424\u0430\u0439\u043b <strong>serverlist.txt<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432:\n<\/p>\n<pre class=\"brush:plain;\" style=\"text-align: justify;\">\r\nservers one.example.com|two.example.com|three.example.com<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0434\u0438\u043d \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043b\u0443\u0447\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438, \u0447\u0435\u043c \u0434\u0440\u0443\u0433\u0438\u0435, \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\n<\/p>\n<p style=\"text-align: justify;\">\n\tApache \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u043a\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 &#8212; <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_proxy_balancer.html\" rel=\"noopener noreferrer\" target=\"_blank\">mod_proxy_balancer<\/a> &ndash; \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439, \u0447\u0435\u043c \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f mod_rewrite.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"69\" name=\"69\"><\/a>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 Userdirs<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0441 \u0442\u044b\u0441\u044f\u0447\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043c\u0430\u043a\u0435\u0442 homedir, \u0442. \u0435. \u041a\u0430\u0436\u0434\u044b\u0439 homedir \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440) \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u0418\u0442\u0430\u043a, \/~larry\/anypath \u044d\u0442\u043e \/home\/l\/larry\/public_html\/anypath, \u0430 \/~waldo\/anypath \u044d\u0442\u043e \/home\/w\/waldo\/public_html\/anypath.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f URL \u0442\u0438\u043b\u044c\u0434\u044b \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u043c\u0430\u043a\u0435\u0442\u0435.\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteEngine on\r\nRewriteRule&nbsp;&nbsp; &quot;^\/~(([a-z])[a-z0-9]+)(.*)&quot;&nbsp; &quot;\/home\/$2\/$1\/public_html$3&quot;<\/pre>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"610\" name=\"610\"><\/a>\u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0430\u043d\u043a\u0435\u0440\u043e\u0432<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u044f\u043a\u043e\u0440\u044c HTML \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e mod_rewrite \u0438\u0437\u0431\u0435\u0433\u0430\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b #, \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u044f \u0435\u0433\u043e \u0432 %23. \u042d\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043d\u0430\u0440\u0443\u0448\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0444\u043b\u0430\u0433 <strong><a href=\"https:\/\/hackware.ru\/?p=5564#312\" rel=\"noopener noreferrer\" target=\"_blank\">[NE]<\/a> <\/strong>\u0432 RewriteRule. NE \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 No Escape &ndash; \u0431\u0435\u0437 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 mod_rewrite, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043a\u043e\u0434\u0438\u0440\u0443\u0435\u0442 URL-\u043a\u043e\u0434\u044b.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"611\" name=\"611\"><\/a>\u0417\u0430\u0432\u0438\u0441\u0438\u043c\u0430\u044f \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044c<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c mod_rewrite \u0434\u043b\u044f \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <strong>TIME_xxx<\/strong> \u0434\u043b\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438. \u0412 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u043b\u0435\u043a\u0441\u0438\u043a\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u043c\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f <strong>&lt;\u0421\u0422\u0420\u041e\u041a\u0410<\/strong>, <strong>&gt;\u0421\u0422\u0420\u041e\u041a\u0410<\/strong> \u0438 <strong>=\u0421\u0422\u0420\u041e\u041a\u0410<\/strong> \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u044f\u0449\u0438\u0435 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u0430\u0446\u0438\u0438:\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteEngine on\r\nRewriteCond&nbsp;&nbsp; &quot;%{TIME_HOUR}%{TIME_MIN}&quot; &quot;&gt;0700&quot;\r\nRewriteCond&nbsp;&nbsp; &quot;%{TIME_HOUR}%{TIME_MIN}&quot; &quot;&lt;1900&quot;\r\nRewriteRule&nbsp;&nbsp; &quot;^foo\\.html$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;foo.day.html&quot; [L]\r\nRewriteRule&nbsp;&nbsp; &quot;^foo\\.html$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;foo.night.html&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u042d\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u0430\u043a, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 foo.day.html \u043f\u043e\u0434 URL foo.html \u0441 07:01 \u043f\u043e 18:59, \u0430 \u0432 \u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u0432\u0440\u0435\u043c\u044f &#8212; \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 foo.night.html.\n<\/p>\n<p style=\"text-align: justify;\">\n\t<a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_cache.html\" rel=\"noopener noreferrer\" target=\"_blank\">mod_cache<\/a>, \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u043a\u0441\u0438 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0451\u043d\u043d\u044b\u0439 \u043a\u044d\u0448, \u0442.\u0435. \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u043d\u0435 \u0442\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f. <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_expires.html\" rel=\"noopener noreferrer\" target=\"_blank\">mod_expires<\/a> \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c. \u041d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0443\u0442\u043e\u043a.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"612\" name=\"612\"><\/a>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u044b \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0442\u043c\u0435\u0442\u043a\u0443 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u043e\u0441\u044c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0437\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0438. \u041e\u0434\u0438\u043d \u0438\u0437 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e &ndash; \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0444\u043b\u0430\u0433 <strong>[E]<\/strong> \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b.\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteEngine on\r\nRewriteRule&nbsp;&nbsp; &quot;^\/horse\/(.*)&quot;&nbsp;&nbsp; &quot;\/pony\/$1&quot; [E=rewritten:1]<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041f\u043e\u0437\u0436\u0435 \u0432 \u0432\u0430\u0448\u0435\u043c \u043d\u0430\u0431\u043e\u0440\u0435 \u043f\u0440\u0430\u0432\u0438\u043b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0441\u0440\u0435\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>RewriteCond<\/strong>:\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteCond &quot;%{ENV:rewritten}&quot; &quot;=1&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043d\u0435 \u0432\u044b\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u043b\u0430\u0433 <strong>[CO]<\/strong> \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u0430 cookie.\n<\/p>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"613\" name=\"613\"><\/a>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043c\u0430\u0441\u0441\u043e\u0432\u044b\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0441 mod_rewrite<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\tmod_rewrite \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/vhosts\/mass.html\" rel=\"noopener noreferrer\" target=\"_blank\">\u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b<\/a>, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a mod_rewrite\n<\/p>\n<h3 style=\"text-align: justify;\">\n\t<a id=\"6131\" name=\"6131\"><\/a>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0434\u043b\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0438\u043c\u0451\u043d \u0445\u043e\u0441\u0442\u043e\u0432<br \/>\n<\/h3>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0445\u043e\u0441\u0442 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0435\u0437\u043e\u0432\u043b\u0438\u0442\u044c\u0441\u044f (\u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f) \u043d\u0430 \u043d\u0430\u0448 \u0434\u043e\u043c\u0435\u043d, \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b VirtualHost.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0412 \u044d\u0442\u043e\u043c \u0440\u0435\u0446\u0435\u043f\u0442\u0435 \u043c\u044b \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 www.SITE.example.com \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u0437 \/home\/SITE\/www.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteEngine on\r\nRewriteMap&nbsp;&nbsp;&nbsp; lowercase int:tolower\r\n\r\nRewriteCond&nbsp;&nbsp; &quot;${lowercase:%{HTTP_HOST}}&quot;&nbsp;&nbsp; &quot;^www\\.([^.]+)\\.example\\.com$&quot;\r\nRewriteRule&nbsp;&nbsp; &quot;^(.*)&quot; &quot;\/home\/%1\/www$1&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0438 DNS &ndash; Apache \u043d\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0438\u043c\u0451\u043d. \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0431\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 CNAME \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0445\u043e\u0441\u0442\u0430, \u043b\u0438\u0431\u043e \u043f\u043e\u0434\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c DNS. \u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 DNS \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044f\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 tolower RewriteMap \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043c\u0435\u043d\u0430 \u0445\u043e\u0441\u0442\u043e\u0432 \u0431\u044b\u043b\u0438 \u0432 \u043d\u0438\u0436\u043d\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u043e\u0432 \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0432\u0443\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0421\u043a\u043e\u0431\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 RewriteCond, \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 <strong>%1<\/strong>, <strong>%2<\/strong>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0441\u043a\u043e\u0431\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 RewriteRule, \u0437\u0430\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 <strong>$1<\/strong>, <strong>$2<\/strong> \u0438 \u0442.\u0434.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041a\u0430\u043a \u0438 \u043c\u043d\u043e\u0433\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u044b\u0435 \u0432 \u044d\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435, mod_rewrite \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443. \u0412\u043c\u0435\u0441\u0442\u043e \u043d\u0435\u0433\u043e \u0432\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_vhost_alias.html\" rel=\"noopener noreferrer\" target=\"_blank\">mod_vhost_alias<\/a>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0431\u043e\u043b\u0435\u0435 \u0433\u0440\u0430\u0446\u0438\u043e\u0437\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u0435, \u043a\u0440\u043e\u043c\u0435 \u043e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043b\u044e\u0431\u043e\u0439 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u0430.\n<\/p>\n<h3 style=\"text-align: justify;\">\n\t<a id=\"6132\" name=\"6132\"><\/a>\u0414\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0445\u043e\u0441\u0442\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mod_rewrite<br \/>\n<\/h3>\n<p style=\"text-align: justify;\">\n\t\u042d\u0442\u043e\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0438\u0437 httpd.conf \u0434\u0435\u043b\u0430\u0435\u0442 \u0442\u043e \u0436\u0435, \u0447\u0442\u043e \u0438 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u0432\u044b\u0448\u0435, \u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0438 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b mod_rewrite; \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 mod_rewrite \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 mod_rewrite \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 URI (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, mod_alias), \u043c\u043e\u0434\u0443\u043b\u044e mod_rewrite \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u044f\u0432\u043d\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u044d\u0442\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438. \u0418, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0431\u0445\u043e\u0434\u0438\u043b\u0438 \u0431\u044b \u043b\u044e\u0431\u044b\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <strong>ScriptAlias<\/strong>, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b mod_rewrite \u044f\u0432\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u043b \u044d\u0442\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f.\n<\/p>\n<pre class=\"brush:plain;\">\r\n# \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043c\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0437 Host: header\r\nUseCanonicalName Off\r\n\r\n# \u0440\u0430\u0437\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043b\u043e\u0433\u0438\r\nLogFormat &quot;%{Host}i %h %l %u %t \\&quot;%r\\&quot; %s %b&quot; vcommon\r\nCustomLog &quot;logs\/access_log&quot; vcommon\r\n\r\n&lt;Directory &quot;\/www\/hosts&quot;&gt;\r\n&nbsp;&nbsp;&nbsp; # ExecCGI \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0437\u0434\u0435\u0441\u044c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043d\u0443\u0434\u0438\u0442\u044c\r\n&nbsp;&nbsp;&nbsp; # CGI \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0435\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u0430\u043a ScriptAlias \u0434\u0435\u043b\u0430\u0435\u0442\r\n&nbsp;&nbsp;&nbsp; Options FollowSymLinks ExecCGI\r\n&lt;\/Directory&gt;\r\n\r\nRewriteEngine On\r\n\r\n# ServerName \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u043d\u043e\u0435 \u0438\u0437 Host: header \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\r\nRewriteMap&nbsp; lowercase&nbsp; int:tolower\r\n\r\n## \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0441 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438:\r\n# \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c Alias &quot;\/icons\/&quot; &ndash; \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u043e\u0432\r\nRewriteCond&nbsp; &quot;%{REQUEST_URI}&quot;&nbsp; &quot;!^\/icons\/&quot;\r\n# \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0430\u0431\u043e\u0442\u0443 CGI\r\nRewriteCond&nbsp; &quot;%{REQUEST_URI}&quot;&nbsp; &quot;!^\/cgi-bin\/&quot;\r\n# \u0434\u0435\u043b\u0430\u0435\u043c \u043c\u0430\u0433\u0438\u044e\r\nRewriteRule&nbsp; &quot;^\/(.*)$&quot;&nbsp; &quot;\/www\/hosts\/${lowercase:%{SERVER_NAME}}\/docs\/$1&quot;\r\n\r\n## \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 CGI &ndash; \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0444\u043e\u0440\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\r\nRewriteCond&nbsp; &quot;%{REQUEST_URI}&quot;&nbsp; &quot;^\/cgi-bin\/&quot;\r\nRewriteRule&nbsp; &quot;^\/(.*)$&quot;&nbsp; &quot;\/www\/hosts\/${lowercase:%{SERVER_NAME}}\/cgi-bin\/$1&quot;&nbsp; [H=cgi-script]<\/pre>\n<h3 style=\"text-align: justify;\">\n\t<a id=\"6133\" name=\"6133\"><\/a>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430<br \/>\n<\/h3>\n<p style=\"text-align: justify;\">\n\t\u0412 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 mod_rewrite \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u0438 \u0441 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u043d\u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0438\u0437 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u044c, \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0424\u0430\u0439\u043b vhost.map \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:\n<\/p>\n<pre class=\"brush:plain;\">\r\ncustomer-1.example.com \/www\/customers\/1\r\ncustomer-2.example.com \/www\/customers\/2\r\n# ...\r\ncustomer-N.example.com \/www\/customers\/N<\/pre>\n<p style=\"text-align: justify;\">\n\t<strong>httpd.conf<\/strong> \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteEngine on\r\n\r\nRewriteMap&nbsp;&nbsp; lowercase&nbsp; int:tolower\r\n\r\n# \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0444\u0430\u0439\u043b \u043a\u0430\u0440\u0442\u044b\r\nRewriteMap&nbsp;&nbsp; vhost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;txt:\/www\/conf\/vhost.map&quot;\r\n\r\n# \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0441\u0435\u0432\u0434\u043e\u043d\u0438\u043c\u044b, \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0432\u044b\u0448\u0435\r\nRewriteCond&nbsp; &quot;%{REQUEST_URI}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;!^\/icons\/&quot;\r\nRewriteCond&nbsp; &quot;%{REQUEST_URI}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;!^\/cgi-bin\/&quot;\r\nRewriteCond&nbsp; &quot;${lowercase:%{SERVER_NAME}}&quot;&nbsp; &quot;^(.+)$&quot;\r\n# \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u0430\u0440\u0442\u044b\r\nRewriteCond&nbsp; &quot;${vhost:%1}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;^(\/.*)$&quot;\r\nRewriteRule&nbsp; &quot;^\/(.*)$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%1\/docs\/$1&quot;\r\n\r\nRewriteCond&nbsp; &quot;%{REQUEST_URI}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;^\/cgi-bin\/&quot;\r\nRewriteCond&nbsp; &quot;${lowercase:%{SERVER_NAME}}&quot;&nbsp; &quot;^(.+)$&quot;\r\nRewriteCond&nbsp; &quot;${vhost:%1}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;^(\/.*)$&quot;\r\nRewriteRule&nbsp; &quot;^\/cgi-bin\/(.*)$&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;%1\/cgi-bin\/$1&quot; [H=cgi-script]<\/pre>\n<h2 style=\"text-align: justify;\">\n\t<a id=\"614\" name=\"614\"><\/a>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 mod_rewrite \u0434\u043b\u044f \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<br \/>\n<\/h2>\n<p style=\"text-align: justify;\">\n\t\u041f\u0440\u043e\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e mod_rewrite\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\tmod_rewrite \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0444\u043b\u0430\u0433 [P], \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0447\u0435\u0440\u0435\u0437 mod_proxy \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0432\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0412 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 URL-\u0430\u0434\u0440\u0435\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u0430\u043a, \u043a\u0430\u043a \u0435\u0441\u043b\u0438 \u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 URL-\u0430\u0434\u0440\u0435\u0441. \u0412 \u0434\u0440\u0443\u0433\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0420\u0435\u0448\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u043b\u0430\u0433 [P], \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0438\u0436\u0435:\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteEngine&nbsp; on\r\nRewriteBase&nbsp;&nbsp;&nbsp; &quot;\/products\/&quot;\r\nRewriteRule&nbsp;&nbsp;&nbsp; &quot;^widget\/(.*)$&quot;&nbsp; &quot;http:\/\/product.example.com\/widget\/$1&quot;&nbsp; [P]\r\nProxyPassReverse &quot;\/products\/widget\/&quot; &quot;http:\/\/product.example.com\/widget\/&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0441 \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439, \u0438 \u0432\u044b \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0435\u043d\u043e.\n<\/p>\n<pre class=\"brush:plain;\">\r\nRewriteCond &quot;%{REQUEST_FILENAME}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !-f\r\nRewriteCond &quot;%{REQUEST_FILENAME}&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; !-d\r\nRewriteRule &quot;^\/(.*)&quot; &quot;http:\/\/old.example.com\/$1&quot; [P]\r\nProxyPassReverse &quot;\/&quot; &quot;http:\/\/old.example.com\/&quot;<\/pre>\n<p style=\"text-align: justify;\">\n\t\u041e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u0435:\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_proxy.html#proxypassreverse\" rel=\"noopener noreferrer\" target=\"_blank\">ProxyPassReverse<\/a>, \u0447\u0442\u043e\u0431\u044b \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043b\u044e\u0431\u044b\u0435 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u0443.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_proxy.html#proxypass\" rel=\"noopener noreferrer\" target=\"_blank\">ProxyPass<\/a> \u0438\u043b\u0438 <a href=\"https:\/\/httpd.apache.org\/docs\/2.4\/mod\/mod_proxy.html#proxypassmatch\" rel=\"noopener noreferrer\" target=\"_blank\">ProxyPassMatch<\/a> \u0432\u043c\u0435\u0441\u0442\u043e mod_rewrite.\n<\/p>\n<p style=\"text-align: justify;\">\n\t\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435: &laquo;<a href=\"https:\/\/hackware.ru\/?p=5869\">\u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e mod_rewrite (\u0447\u0430\u0441\u0442\u044c 7): \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteMap<\/a>&raquo;.<\/p>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>\u041e\u0433\u043b\u0430\u0432\u043b\u0435\u043d\u0438\u0435. \u041f\u043e\u043b\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e mod_rewrite 1. \u041a\u0430\u043a \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442&nbsp;mod_rewrite 2. \u0420\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f&nbsp;mod_rewrite 3.&nbsp;\u0424\u043b\u0430\u0433\u0438 RewriteRule 4.&nbsp;\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 RewriteCond 5. \u0427\u0430\u0441\u0442\u044b\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f mod_rewrite 6.&nbsp;\u041f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0435 \u0442\u0435\u0445\u043d\u0438\u043a\u0438 6.1 \u041f\u043e\u0438\u0441\u043a \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u0430\u043f\u043a\u0430\u0445 6.2 \u041f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b 6.3 \u041f\u043e\u043a\u0430\u0437 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 6.4 \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u043d\u044b\u0439 DocumentRoot 6.5<a href=\"https:\/\/hackware.ru\/?p=5676\" class=\"read-more\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[10,230,54,8],"class_list":["post-5676","post","type-post","status-publish","format-standard","hentry","category-2","tag-apache","tag-mod_rewrite","tag-54","tag-8"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/hackware.ru\/index.php?rest_route=\/wp\/v2\/posts\/5676"}],"collection":[{"href":"https:\/\/hackware.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hackware.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hackware.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hackware.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5676"}],"version-history":[{"count":17,"href":"https:\/\/hackware.ru\/index.php?rest_route=\/wp\/v2\/posts\/5676\/revisions"}],"predecessor-version":[{"id":13903,"href":"https:\/\/hackware.ru\/index.php?rest_route=\/wp\/v2\/posts\/5676\/revisions\/13903"}],"wp:attachment":[{"href":"https:\/\/hackware.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hackware.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hackware.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}