去除opencart3.0中的noindex

1、这个主要配置是位置1:\storage\modification\catalog\controller\common\header.php:

位置2:\storeafl\catalog\controller\common\header.php 引起的 主要为:

4 $page = !empty($this->request->get[‘route’]) ? $this->request->get[‘route’] : ”;
5 if ($page === ‘product/search’) {
6: $data[‘show_robots’] = true;
7 } elseif (strpos($_SERVER[‘REQUEST_URI’], ‘?’) !== false) {
8: $data[‘show_robots’] = true;
9 } else {
10: $data[‘show_robots’] = false;
11 }
12 // Analytics

它跟这个路径下的是有关联的,前面的控制全局。后面的的是模板加载。/www/web/irushops_com/catalog/view/theme/clearshop/template/common/header.twig

{% if show_robots %}

{% endif %}

Comments

发表回复

Your email address will not be published. Name and email are required