Commit 4b7c8f538a5e7a8e57f4bdf733dce0e07f7473f9

Authored by Administrator
1 parent b2f4bd83

site map

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
console/SiteMapController.php
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 public function getAddStatic() 27 public function getAddStatic()
28 { 28 {
29 return [ 29 return [
30 - 'https://extremstyle.ua/ru', 30 + Yii::$app->urlManager->baseUrl.'/ru',
31 ]; 31 ];
32 } 32 }
33 33
@@ -68,6 +68,7 @@ @@ -68,6 +68,7 @@
68 ->joinWith('taxGroups.lang') 68 ->joinWith('taxGroups.lang')
69 ->with('taxGroups.taxOptions.lang') 69 ->with('taxGroups.taxOptions.lang')
70 ->where(['!=', 'tax_group.meta_robots', 'noindex,nofollow' ]) 70 ->where(['!=', 'tax_group.meta_robots', 'noindex,nofollow' ])
  71 + ->where(['tax_group.is_filter'=>true ])
71 ->all(); 72 ->all();
72 } 73 }
73 74
@@ -215,7 +216,7 @@ @@ -215,7 +216,7 @@
215 fclose($this->handle); 216 fclose($this->handle);
216 217
217 $this->mainMap .= '<sitemap>'. 218 $this->mainMap .= '<sitemap>'.
218 - '<loc>https://extremstyle.ua/ru/' . $this->fileName . '</loc>'. 219 + '<loc>'.Yii::$app->urlManager->baseUrl.'/ru/' . $this->fileName . '</loc>'.
219 '<lastmod>' . date('Y-m-d') . '</lastmod>'. 220 '<lastmod>' . date('Y-m-d') . '</lastmod>'.
220 '</sitemap>'. 221 '</sitemap>'.
221 '</sitemapindex>'; 222 '</sitemapindex>';