Commit 7a3cca71d5364ac93e31b6092b5dce9078634fe2

Authored by Dmytry Fedorchuk
1 parent 446efeeb

SEO

@@ -43,7 +43,6 @@ AddDefaultCharset utf-8 @@ -43,7 +43,6 @@ AddDefaultCharset utf-8
43 RewriteRule ^.*$ backend/web/index.php [L] 43 RewriteRule ^.*$ backend/web/index.php [L]
44 44
45 45
46 -  
47 RewriteCond %{REQUEST_URI} ^/(assets|css) 46 RewriteCond %{REQUEST_URI} ^/(assets|css)
48 47
49 RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L] 48 RewriteRule ^assets/(.*)$ frontend/web/assets/$1 [L]
frontend/config/main.php
@@ -79,6 +79,7 @@ return [ @@ -79,6 +79,7 @@ return [
79 ], 79 ],
80 'priceparam.xml' => 'site/priceparam', 80 'priceparam.xml' => 'site/priceparam',
81 'price.xml' => 'site/price', 81 'price.xml' => 'site/price',
  82 + 'robots.txt' => 'site/robots',
82 'smstest' => 'site/sms', 83 'smstest' => 'site/sms',
83 // 'catalog' => 'catalog/all', 84 // 'catalog' => 'catalog/all',
84 // 'catalog/<translit:\w+>' => 'catalog/index', 85 // 'catalog/<translit:\w+>' => 'catalog/index',
frontend/controllers/SiteController.php
@@ -36,6 +36,15 @@ class SiteController extends Controller @@ -36,6 +36,15 @@ class SiteController extends Controller
36 ]); 36 ]);
37 } 37 }
38 38
  39 +
  40 + public function actionRobots()
  41 + {
  42 +
  43 + return $this->renderPartial('robots', [
  44 +
  45 + ]);
  46 + }
  47 +
39 public function actionError(){ 48 public function actionError(){
40 49
41 return $this->render('error', [ 50 return $this->render('error', [
frontend/views/layouts/main.php
@@ -64,15 +64,6 @@ $this-&gt;registerJsFile (Yii::$app-&gt;request-&gt;baseUrl . &#39;/js/fix_height.js&#39;, [&#39;posi @@ -64,15 +64,6 @@ $this-&gt;registerJsFile (Yii::$app-&gt;request-&gt;baseUrl . &#39;/js/fix_height.js&#39;, [&#39;posi
64 }); 64 });
65 ", View::POS_READY); 65 ", View::POS_READY);
66 66
67 -$this->registerJs("  
68 -(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){  
69 - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),  
70 -m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)  
71 -})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');  
72 -  
73 -ga('create', 'UA-75674711-1', 'auto');  
74 -ga('send', 'pageview');  
75 - ", View::POS_BEGIN);  
76 67
77 // AssetBundle jcarousel :D [close] 68 // AssetBundle jcarousel :D [close]
78 69
@@ -94,7 +85,16 @@ ga(&#39;send&#39;, &#39;pageview&#39;); @@ -94,7 +85,16 @@ ga(&#39;send&#39;, &#39;pageview&#39;);
94 <script type="text/javascript" src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js" charset="utf-8"></script> 85 <script type="text/javascript" src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js" charset="utf-8"></script>
95 <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script> 86 <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
96 <!-- SOCIAL ICON --> 87 <!-- SOCIAL ICON -->
97 - 88 +
  89 + <script>
  90 + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  91 + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  92 + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  93 + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  94 +
  95 + ga('create', 'UA-75674711-1', 'auto');
  96 + ga('send', 'pageview');
  97 + </script>
98 </head> 98 </head>
99 <body> 99 <body>
100 <!-- Google Tag Manager --> 100 <!-- Google Tag Manager -->
frontend/views/site/robots.php 0 → 100644
  1 +User-agent: *
  2 +
  3 +Disallow: /*reg
  4 +
  5 +Disallow: /basket
  6 +
  7 +Disallow: /login
  8 +
  9 +Disallow: /*from=adwords
  10 +
  11 +Disallow: /*utm_source=
  12 +
  13 +Host: www.rukzachok.com.ua
  14 +
  15 +Sitemap: http://www.rukzachok.com.ua/sitemap.xml
0 \ No newline at end of file 16 \ No newline at end of file
frontend/web/robots.txt
1 User-agent: * 1 User-agent: *
2 -Disallow:  
3 \ No newline at end of file 2 \ No newline at end of file
  3 +
  4 +Disallow: /*reg
  5 +
  6 +Disallow: /basket
  7 +
  8 +Disallow: /login
  9 +
  10 +Disallow: /*from=adwords
  11 +
  12 +Disallow: /*utm_source=
  13 +
  14 +Host: www.rukzachok.com.ua
  15 +
  16 +Sitemap: http://www.rukzachok.com.ua/sitemap.xml
4 \ No newline at end of file 17 \ No newline at end of file