Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Настроить ЧПУ для карты сайта


Recommended Posts

Добрый день! подскажите, как правильно сгенерировать ссылку с /index.php?route=extension/feed/yandex_sitemap на sitemap.xml . В роботсе закрыты ссылки с /index.php? поэтому в вебмастере не пускает ссылку такого вида.

Link to comment
Share on other sites


8 минут назад, buslikdrev сказал:

.htaccess

RewriteRule ^sitemap.xml$ index.php?route=feed/sitemap_pro [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]

RewriteRule ^sitemap.xml$ index.php?route=extension/feed/yandex_sitemap [L]

не работает, и он наоборот заменяет ссылку sitemap.xml по умолчанию на гугловскую без чпу

Link to comment
Share on other sites


Добавить в файл /catalog/controller/startup/seo_pro.php 

в метод validate 

 

if (ltrim($this->request->server['REQUEST_URI'], '/') == 'sitemap.xml') {
  $this->request->get['route'] = 'extension/feed/google_sitemap';
  return;
}

 

Link to comment
Share on other sites


  • 8 months later...
В 18.11.2017 в 22:03, glum сказал:

Добавить в файл /catalog/controller/startup/seo_pro.php 

в метод validate 

 


if (ltrim($this->request->server['REQUEST_URI'], '/') == 'sitemap.xml') {
  $this->request->get['route'] = 'extension/feed/google_sitemap';
  return;
}

 

А если такая правка внесена, но все равно sitemap не становится ЧПУ, куда еще можно покопать?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.