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

sitemap.xml url


Recommended Posts

Здравствуйте. почему то не хочет работать краткий адрес установленный в .htaccess для sitemap.xml

 

Цитата

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

 

что характерно, для обычного модуля карты сайта все срабатывает

 

Цитата

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

 

подскажите как заставить вот эту ... index.php?route=extension/feed/simple_google_sitemap

открываться по ссылке /sitemap.xml

спасибо

Edited by AlexMax13
Link to comment
Share on other sites


Не хочет -- это Ваше понимание. А что конкретно оно говорит?)

Посылает куда подальше (на главную) или выдает многозначительный белый экран? Или что конкретно происходит?

Link to comment
Share on other sites

В 20.04.2023 в 14:23, SergeTkach сказав:

Не хочет -- это Ваше понимание. А что конкретно оно говорит?)

Посылает куда подальше (на главную) или выдает многозначительный белый экран? Или что конкретно происходит?

 

сама страница работает. только при переходе по ссылке /sitemap.xml идет переадресация на /index.php?route=extension/feed/simple_google_sitemap
в остальном проблем нет. главное что нужно, это чтобы карта сайта работала по адресу /sitemap.xml вместо /index.php?route=extension/feed/simple_google_sitemap

Link to comment
Share on other sites


public function validate() {

        // break redirect for php-cli-script
        if (php_sapi_name() === 'cli')
            return;

        // fix flat link for xml feed
        if (isset($this->request->get['route'])) {
            $break_routes = [
                'error/not_found',
                'extension/feed/google_sitemap',
                'extension/feed/google_base',
                'extension/feed/sitemap_pro',
            ];

            if (in_array($this->request->get['route'], $break_routes))
                return;
        }
 // ...
}

 

Это код из system/library/seopro.php тройки

  • +1 1
Link to comment
Share on other sites

В 20.04.2023 в 14:29, SergeTkach сказав:
public function validate() {

        // break redirect for php-cli-script
        if (php_sapi_name() === 'cli')
            return;

        // fix flat link for xml feed
        if (isset($this->request->get['route'])) {
            $break_routes = [
                'error/not_found',
                'extension/feed/google_sitemap',
                'extension/feed/google_base',
                'extension/feed/sitemap_pro',
            ];

            if (in_array($this->request->get['route'], $break_routes))
                return;
        }
 // ...
}

 

Это код из system/library/seopro.php тройки

 

спасибо, работает на ура)))))))))

Link to comment
Share on other sites


  • 2 weeks later...
Posted (edited)
20.04.2023 в 14:29, SergeTkach сказал:

Это код из system/library/seopro.php тройки

Подскажите, пожалуйста, где взять свежий seo pro? У меня какая-то старая версия, в system/library/ ничего от seo pro не вижу. Для opencart 2.3

Edited by digistore
Link to comment
Share on other sites


Ну это ж было для тройки.

А для двойки был на форуме когда-то, да всплыл.

А, вот у меня завалялся. Он был бесплатным, лицензия у системы GPL -- думаю, можно поделиться.

Были ли более новые версии после него, даже не знаю.

 

seopro_230x_1.01beta.ocmod.zip

 

А еще, блин, это для чистого OpenCart. Для ocStore 2 на гите ж есть -- https://github.com/myopencart/ocStore/blob/ocStore2/upload/catalog/controller/startup/seo_pro.php

  • +1 1
Link to comment
Share on other sites

Спасибо!

 

seopro_230x_1.01beta.ocmod.zip - такой и стоит

 

Не могу подружить seopro со сторонним модулем.

1. в базу добавил строку с query и keyword

2. в seopro добавил код

} elseif (isset($this->request->get['smaspp_form_id'])) {
				$this->request->get['route'] = 'extension/ocdevwizard/smart_advanced_search_pro_plus/page';

По короткой ссылке домен/advanced-search/?search=apple модуль отрабатывает, НО url меняется на длинный: домен/index.php?route=extension/ocdevwizard/smart_advanced_search_pro_plus/page&smaspp_form_id=2&search=apple. Когда вызываешь по длинному урл, в короткий не преобразует.

 

Не понимаю как доделать, чтобы не менялось с ЧПУ на полный путь И менялось с полного пути на ЧПУ :-?

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.