Commit 40f6051334daa5a6de1fe6013d06613a8d7db02b
1 parent
ee04c911
redirects
Showing
3 changed files
with
56 additions
and
12 deletions
Show diff stats
| 1 | +<?php | |
| 2 | + /** | |
| 3 | + * Created by PhpStorm. | |
| 4 | + * User: timur | |
| 5 | + * Date: 22.11.17 | |
| 6 | + * Time: 11:54 | |
| 7 | + */ | |
| 8 | + | |
| 9 | + namespace common\models; | |
| 10 | + | |
| 11 | + use artbox\core\models\interfaces\RedirectInterface; | |
| 12 | + use yii\base\Object; | |
| 13 | + | |
| 14 | + class DirectRedirect extends Object implements RedirectInterface | |
| 15 | + { | |
| 16 | + | |
| 17 | + protected $link; | |
| 18 | + | |
| 19 | + public function doRedirect(string $url): bool | |
| 20 | + { | |
| 21 | + $urlArray = array( | |
| 22 | + '/site/index' => '/ru', | |
| 23 | + '/site/about' => '/ru/about', | |
| 24 | + '/site/contact' => '/ru/contact', | |
| 25 | + ); | |
| 26 | + if (isset($urlArray[$url])){ | |
| 27 | + $this->link = $urlArray[$url]; | |
| 28 | + return true; | |
| 29 | + } | |
| 30 | + | |
| 31 | + return false; | |
| 32 | + } | |
| 33 | + | |
| 34 | + public function getLink(): string | |
| 35 | + { | |
| 36 | + return trim($this->link, "/"); | |
| 37 | + } | |
| 38 | + } | |
| 0 | 39 | \ No newline at end of file | ... | ... |
frontend/config/main.php
| ... | ... | @@ -46,6 +46,12 @@ return [ |
| 46 | 46 | 'class' => SeoUrlManager::className(), |
| 47 | 47 | 'enablePrettyUrl' => true, |
| 48 | 48 | 'showScriptName' => false, |
| 49 | + 'redirects' => [ | |
| 50 | + \common\models\DirectRedirect::className() | |
| 51 | + ], | |
| 52 | + 'processRoutes' => [ | |
| 53 | + 'page/view', | |
| 54 | + ], | |
| 49 | 55 | 'rules' => [ |
| 50 | 56 | '\/robots.txt' => 'site/robots', |
| 51 | 57 | '/' => 'site/index', | ... | ... |
frontend/views/site/index.php
| ... | ... | @@ -31,7 +31,7 @@ _________________________________________________________ --> |
| 31 | 31 | |
| 32 | 32 | <div class="row"> |
| 33 | 33 | <div class="col-sm-6 mb-small"> |
| 34 | - <img class="img-responsive" src="/img/hp_tab_sales.gif" alt="" style="border: 5px solid #5f5f5f;box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);"> | |
| 34 | + <img class="img-responsive" src="/img/hp_tab_sales.gif" alt="От сервис-провайдера “Облако”" style="border: 5px solid #5f5f5f;box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);"> | |
| 35 | 35 | </div> |
| 36 | 36 | |
| 37 | 37 | <div class="col-sm-6 text-center-xs"> |
| ... | ... | @@ -63,7 +63,7 @@ _________________________________________________________ --> |
| 63 | 63 | </p> |
| 64 | 64 | </div> |
| 65 | 65 | <div class="col-md-6 text-center"> |
| 66 | - <img src="/img/odoo-laptop.png" alt="" class="img-responsive"> | |
| 66 | + <img src="/img/odoo-laptop.png" alt="Хостинг и аренда конфигурации Odoo" class="img-responsive"> | |
| 67 | 67 | </div> |
| 68 | 68 | </div> |
| 69 | 69 | </div> |
| ... | ... | @@ -73,7 +73,7 @@ _________________________________________________________ --> |
| 73 | 73 | <div class="container"> |
| 74 | 74 | <div class="row"> |
| 75 | 75 | <div class="col-md-6 text-center"> |
| 76 | - <img src="/img/pic-block-three.png" alt="" class="img-responsive" style="margin-top: 20px;width: 90%;border: 5px solid #5f5f5f;box-shadow: 15px 15px 17px 10px rgba(0, 0, 0, 0.15);"> | |
| 76 | + <img src="/img/pic-block-three.png" alt="Управление продажами и проектами онлайн" class="img-responsive" style="margin-top: 20px;width: 90%;border: 5px solid #5f5f5f;box-shadow: 15px 15px 17px 10px rgba(0, 0, 0, 0.15);"> | |
| 77 | 77 | </div> |
| 78 | 78 | <div class="col-md-6"> |
| 79 | 79 | <h2 class="text-uppercase">Управление продажами и проектами онлайн</h2> |
| ... | ... | @@ -101,7 +101,7 @@ _________________________________________________________ --> |
| 101 | 101 | </p> |
| 102 | 102 | </div> |
| 103 | 103 | <div class="col-md-6 text-center"> |
| 104 | - <img src="/img/pic-block-four.png" alt="" class="img-responsive" style="margin-top: 20px;width: 90%;border: 5px solid #5f5f5f;box-shadow: -15px 15px 5px 0px rgba(0, 0, 0, 0.1);"> | |
| 104 | + <img src="/img/pic-block-four.png" alt="ERP в облаке" class="img-responsive" style="margin-top: 20px;width: 90%;border: 5px solid #5f5f5f;box-shadow: -15px 15px 5px 0px rgba(0, 0, 0, 0.1);"> | |
| 105 | 105 | </div> |
| 106 | 106 | </div> |
| 107 | 107 | </div> |
| ... | ... | @@ -111,7 +111,7 @@ _________________________________________________________ --> |
| 111 | 111 | <div class="container"> |
| 112 | 112 | <div class="row"> |
| 113 | 113 | <div class="col-md-6 text-center"> |
| 114 | - <img src="/img/pic-block-five.png" alt="" class="img-responsive"> | |
| 114 | + <img src="/img/pic-block-five.png" alt="Odoo и ArtBox: интеграция с сайтом и интернет-магазином" class="img-responsive"> | |
| 115 | 115 | </div> |
| 116 | 116 | <div class="col-md-6"> |
| 117 | 117 | <h2 class="text-uppercase">Odoo и ArtBox: интеграция с сайтом и интернет-магазином</h2> |
| ... | ... | @@ -139,7 +139,7 @@ _________________________________________________________ --> |
| 139 | 139 | </p> |
| 140 | 140 | </div> |
| 141 | 141 | <div class="col-md-6 text-center"> |
| 142 | - <img src="/img/odoo_serv_01.png" alt="Cloudbank" class="img-responsive" style="margin:auto;"> | |
| 142 | + <img src="/img/odoo_serv_01.png" alt="CloudBank" class="img-responsive" style="margin:auto;"> | |
| 143 | 143 | </div> |
| 144 | 144 | </div> |
| 145 | 145 | </div> |
| ... | ... | @@ -155,22 +155,22 @@ _________________________________________________________ --> |
| 155 | 155 | |
| 156 | 156 | <ul class="owl-carousel customers"> |
| 157 | 157 | <li class="item"> |
| 158 | - <img src="/img/oblako-cust.png" alt="" class="img-responsive"> | |
| 158 | + <img src="/img/oblako-cust.png" alt="oblako" class="img-responsive"> | |
| 159 | 159 | </li> |
| 160 | 160 | <li class="item"> |
| 161 | - <img src="/img/artweb-cust.png" alt="" class="img-responsive"> | |
| 161 | + <img src="/img/artweb-cust.png" alt="artweb" class="img-responsive"> | |
| 162 | 162 | </li> |
| 163 | 163 | <li class="item"> |
| 164 | - <img src="/img/kben-cust.png" alt="" class="img-responsive"> | |
| 164 | + <img src="/img/kben-cust.png" alt="kb energy" class="img-responsive"> | |
| 165 | 165 | </li> |
| 166 | 166 | <li class="item"> |
| 167 | - <img src="/img/extreme-cust.png" alt="" class="img-responsive"> | |
| 167 | + <img src="/img/extreme-cust.png" alt="Екстрем стайл" class="img-responsive"> | |
| 168 | 168 | </li> |
| 169 | 169 | <li class="item"> |
| 170 | - <img src="/img/pizza33-cust.png" alt="" class="img-responsive"> | |
| 170 | + <img src="/img/pizza33-cust.png" alt="Pizza 33" class="img-responsive"> | |
| 171 | 171 | </li> |
| 172 | 172 | <li class="item"> |
| 173 | - <img src="/img/arenda-cust.png" alt="" class="img-responsive"> | |
| 173 | + <img src="/img/arenda-cust.png" alt="Kiev Accomodation" class="img-responsive"> | |
| 174 | 174 | </li> |
| 175 | 175 | </ul> |
| 176 | 176 | <!-- /.owl-carousel --> | ... | ... |