{"id":4964,"date":"2021-08-09T07:44:42","date_gmt":"2021-08-09T07:44:42","guid":{"rendered":"https:\/\/www.bearloga.space\/?page_id=4964"},"modified":"2021-08-09T07:44:42","modified_gmt":"2021-08-09T07:44:42","slug":"yii-pravila-url","status":"publish","type":"page","link":"https:\/\/www.bearloga.space\/uk\/yii-pravila-url\/","title":{"rendered":"Yii \u2014 \u041f\u0440\u0430\u0432\u0438\u043b\u0430 URL"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0430\u0432\u0438\u043b\u043e URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c, \u0435\u0441\u043b\u0438&nbsp;<strong>yii \\ web \\ UrlRule<\/strong>&nbsp;.&nbsp;\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b&nbsp;<strong>urlManager<\/strong>&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 URL, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435&nbsp;<strong>rules,<\/strong>&nbsp;\u043a\u043e\u0433\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440 URL \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0438\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u0438\u0449\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 1<\/strong>&nbsp;\u2014&nbsp;<strong>\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435<\/strong>&nbsp;\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442&nbsp;<strong>urlManager \u0432<\/strong>&nbsp;\u0444\u0430\u0439\u043b\u0435&nbsp;<strong>config \/ web.php<\/strong>&nbsp;.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'urlManager' =&gt; [\n   'showScriptName' =&gt; false,\n   'enablePrettyUrl' =&gt; true,\n   'rules' =&gt; [\n      'about' =&gt; 'site\/about',\n   ]\n],<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 2<\/strong>&nbsp;\u2014 \u0417\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u0432\u0430\u0448 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443&nbsp;<strong>http: \/\/ localhost: 8080 \/ about,<\/strong>&nbsp;\u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 about.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/coderlessons.com\/wp-content\/uploads\/2019\/07\/modified_urlmanager_component.png\" alt=\"\u041c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 urlManager\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0430\u0432\u0438\u043b\u043e URL \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u044d\u0442\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u2014<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&lt;ParamName: RegExp&gt;, \u0433\u0434\u0435 \u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>ParamName<\/strong>&nbsp;\u2014 \u0438\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/li><li><strong>RegExp<\/strong>&nbsp;\u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>ParamName<\/strong>&nbsp;\u2014 \u0438\u043c\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>RegExp<\/strong>\u00a0\u2014 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 URL \u2014<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[\n   'articles\/&lt;year:\\d{4}&gt;\/&lt;category&gt;' =&gt; 'article\/index',\n   'articles' =&gt; 'article\/index',\n   'article\/&lt;id:\\d+&gt;' =&gt; 'article\/view',\n]<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f&nbsp;<strong>\u0440\u0430\u0437\u0431\u043e\u0440\u0430<\/strong>&nbsp;\u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\/index.php\/articles \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \/ \u0438\u043d\u0434\u0435\u043a\u0441\u0435<\/li><li>\/index.php\/articles\/2014\/php \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \/ \u0438\u043d\u0434\u0435\u043a\u0441\u0435<\/li><li>\/index.php\/article\/100 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \/ \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0435<\/li><li>\/index.php\/articles\/php \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \/ php<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u043b\u044f&nbsp;<strong>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f URL<\/strong>&nbsp;\u2014<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Url :: to ([\u2018article \/ index\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/articles<\/li><li>Url :: to ([\u2018article \/ index\u2019, \u2018year\u2019 =&gt; 2014, \u2018category\u2019 =&gt; \u2018php\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/articles\/2014\/php<\/li><li>Url :: to ([\u2018article \/ view\u2019, \u2018id\u2019 =&gt; 100]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/article\/100<\/li><li>Url :: to ([\u2018article \/ view\u2019, \u2018id\u2019 =&gt; 100, \u2018source\u2019 =&gt; \u2018ad\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/article\/100?source=ad<\/li><li>Url :: to ([\u2018article \/ index\u2019, \u2018category\u2019 =&gt; \u2018php\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/article\/index?category=php<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Url :: to ([\u2018article \/ index\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/articles<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Url :: to ([\u2018article \/ index\u2019, \u2018year\u2019 =&gt; 2014, \u2018category\u2019 =&gt; \u2018php\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/articles\/2014\/php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Url :: to ([\u2018article \/ view\u2019, \u2018id\u2019 =&gt; 100]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/article\/100<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Url :: to ([\u2018article \/ view\u2019, \u2018id\u2019 =&gt; 100, \u2018source\u2019 =&gt; \u2018ad\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/article\/100?source=ad<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Url :: to ([\u2018article \/ index\u2019, \u2018category\u2019 =&gt; \u2018php\u2019]) \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \/index.php\/article\/index?category=php<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u0443\u0444\u0444\u0438\u043a\u0441 \u043a URL-\u0430\u0434\u0440\u0435\u0441\u0443, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e&nbsp;<strong>yii \\ web \\ UrlManager :: $ \u0441\u0443\u0444\u0444\u0438\u043a\u0441<\/strong>&nbsp;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 3<\/strong>&nbsp;\u2014 \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435&nbsp;<strong>urlComponent<\/strong>&nbsp;\u0432 \u0444\u0430\u0439\u043b\u0435&nbsp;<strong>config \/ web.php<\/strong>&nbsp;.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">'urlManager' =&gt; [\n   'showScriptName' =&gt; false,\n   'enablePrettyUrl' =&gt; true,\n   'enableStrictParsing' =&gt; true,\n   'suffix' =&gt; '.html'\n],<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u0428\u0430\u0433 4<\/strong>&nbsp;\u2014 \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441&nbsp;<strong>http: \/\/ localhost: 8080 \/ site \/ contact.html<\/strong>&nbsp;\u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u0432\u0435\u0431-\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430, \u0438 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435.&nbsp;\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u0443\u0444\u0444\u0438\u043a\u0441&nbsp;<strong>html<\/strong>&nbsp;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041f\u0440\u0430\u0432\u0438\u043b\u043e URL \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u043e\u043c, \u0435\u0441\u043b\u0438&nbsp;yii \\ web \\ UrlRule&nbsp;.&nbsp;\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b&nbsp;urlManager&nbsp;\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 URL, \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432 \u0435\u0433\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435&nbsp;rules,&nbsp;\u043a\u043e\u0433\u0434\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 URL. \u0414\u043b\u044f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[156],"tags":[],"class_list":["post-4964","page","type-page","status-publish","hentry","category-yii"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/comments?post=4964"}],"version-history":[{"count":1,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4964\/revisions"}],"predecessor-version":[{"id":4965,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/pages\/4964\/revisions\/4965"}],"wp:attachment":[{"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/media?parent=4964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/categories?post=4964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bearloga.space\/uk\/wp-json\/wp\/v2\/tags?post=4964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}