Перейти до вмісту
Пошук в
  • Детальніше...
Шукати результати, які ...
Шукати результати в ...

Artem1717

Новачок
  
  • Публікації

    1
  • З нами

  • Відвідування

Повідомлення, опубліковані користувачем Artem1717

  1. В 26.05.2017 в 23:26, Yoda сказал:

     

    Удачи, я ваша волшебная фея.
    Идеальный роботс для разных магазинов за 3 минуты:

     

    1. Размещаем в корне файл robots.php
    Ниже приведенный листинг директив с индивидуального проекта - каждый может добавить необходимое.

     

    
    <?php
    $server = $_SERVER['SERVER_NAME'];
    $text =  "User-agent: *
    
    Disallow:/admin
    Disallow:/catalog
    Disallow:/download
    Disallow:/system
    Disallow:/index.php?route=account/account
    Disallow:/index.php?route=account/simpleregister
    Disallow:/index.php?route=account/login
    Disallow:/index.php?route=account/logout
    Disallow:/index.php?route=account/forgotten
    Disallow:/index.php?route=account/simpleedit
    Disallow:/index.php?route=account/address
    Disallow:/index.php?route=account/voucher
    Disallow:/index.php?route=account/reward
    Disallow:/index.php?route=account/wishlist
    Disallow:/index.php?route=account/newsletter
    Disallow:/index.php?route=account/order
    Disallow:/index.php?route=account/transaction
    Disallow:/index.php?route=account/return
    Disallow:/index.php?route=account/return/insert
    Disallow:/index.php?route=account/download
    
    Disallow:/index.php?route=affiliate/account
    Disallow:/index.php?route=affiliate/register
    Disallow:/index.php?route=affiliate/login
    Disallow:/index.php?route=affiliate/logout
    Disallow:/index.php?route=affiliate/forgotten
    Disallow:/index.php?route=affiliate/edit
    Disallow:/index.php?route=affiliate/password
    Disallow:/index.php?route=affiliate/transaction
    Disallow:/index.php?route=affiliate/payment
    Disallow:/index.php?route=affiliate/tracking
    
    
    Disallow:/index.php?route=checkout/simplecheckout
    Disallow:/index.php?route=checkout/simplecheckout
    Disallow:/index.php?route=checkout/success
    
    Disallow:/index.php?route=product/search
    Disallow:/index.php?route=product/quickview
    Disallow:/*?filter_name=
    Disallow:/*&filter_name=
    Disallow:/*?filter_ocfilter=
    Disallow:/*&filter_ocfilter=
    Disallow:/*?filter_sub_category=
    Disallow:/*&filter_sub_category=
    Disallow:/*?filter_description=
    Disallow:/*&filter_description=
    
    Disallow:/index.php?route=product/compare
    
    Disallow:/*?sort=
    Disallow:/*&sort=
    Disallow:/*?order=
    Disallow:/*&order=
    Disallow:/*?limit=
    Disallow:/*&limit=
    Disallow:/*?tracking=
    Disallow:/*&tracking=
    Disallow:/*?
    Disallow:/*amp
    
    
    
    User-agent: Yandex
    
    Disallow:/admin
    Disallow:/catalog
    Disallow:/download
    Disallow:/system
    
    Disallow:/index.php?route=account/account
    Disallow:/index.php?route=account/simpleregister
    Disallow:/index.php?route=account/login
    Disallow:/index.php?route=account/logout
    Disallow:/index.php?route=account/forgotten
    Disallow:/index.php?route=account/simpleedit
    Disallow:/index.php?route=account/address
    Disallow:/index.php?route=account/voucher
    Disallow:/index.php?route=account/reward
    Disallow:/index.php?route=account/wishlist
    Disallow:/index.php?route=account/newsletter
    Disallow:/index.php?route=account/order
    Disallow:/index.php?route=account/transaction
    Disallow:/index.php?route=account/return
    Disallow:/index.php?route=account/return/insert
    Disallow:/index.php?route=account/download
    
    Disallow:/index.php?route=affiliate/account
    Disallow:/index.php?route=affiliate/register
    Disallow:/index.php?route=affiliate/login
    Disallow:/index.php?route=affiliate/logout
    Disallow:/index.php?route=affiliate/forgotten
    Disallow:/index.php?route=affiliate/edit
    Disallow:/index.php?route=affiliate/password
    Disallow:/index.php?route=affiliate/transaction
    Disallow:/index.php?route=affiliate/payment
    Disallow:/index.php?route=affiliate/tracking
    
    
    Disallow:/index.php?route=checkout/simplecheckout
    Disallow:/index.php?route=checkout/simplecheckout
    Disallow:/index.php?route=checkout/success
    
    Disallow:/index.php?route=product/search
    Disallow:/index.php?route=product/quickview
    Disallow:/*?filter_name=
    Disallow:/*&filter_name=
    Disallow:/*?filter_ocfilter=
    Disallow:/*&filter_ocfilter=
    Disallow:/*?filter_sub_category=
    Disallow:/*&filter_sub_category=
    Disallow:/*?filter_description=
    Disallow:/*&filter_description=
    
    Disallow:/index.php?route=product/compare
    
    Disallow:/*?sort=
    Disallow:/*&sort=
    Disallow:/*?order=
    Disallow:/*&order=
    Disallow:/*?limit=
    Disallow:/*&limit=
    Disallow:/*?tracking=
    Disallow:/*&tracking=
    Disallow:/*?
    Disallow:/*amp
    Host: $server
    Sitemap: http://$server/sitemap.xml
    ";
    
    header("Content-Type: text/plain");
    echo $text;
    exit;
    
    ?>
    

     

    2. Добавляем в .htaccess директиву:

    
    RewriteRule ^robots.txt$ robots.php

    Я надеюсь все довольны.

    Здравствуйте, являюсь профаном, пытаюсь найти решение для домена типа site.ru. Сайт на BITRIX. Есть поддомен spb.site.ru, попробовал 6 методов и вот попробовал по вашему тоже не вышло, но много положительных отзывов, может я что то не проставил где-то? 
    К примеру, нужно ли заменять где - либо слово server на "site" или нет?
    Что сделал:
    1) Прописал в .htaccess директиву:

    <IfModule mod_rewrite.c>
      RewriteRule ^robots.txt$ robots.php
    ...
    </IfModule>

    2) Создал robots.php
    добавил туда все, что было в robots.txt, + то, что у вас написано, вышло так:

    <?php
    $server = $_SERVER['SERVER_NAME'];
    $text =  "User-agent: *
    Sitemap: http://$server/sitemap_files.xml
    ..........много всего по оптимизации с директивой disallow.......

    User-agent: Yandex
    ..........много всего по оптимизации с директивой disallow.......
    Clean-param: tracking
    Host: $server
    Sitemap: http://$server/sitemap_files.xml
    ";

    User-Agent: Googlebot
    Disallow: /bitrix/
    Sitemap: http://$server/sitemap_files.xml

    header("Content-Type: text/plain");
    echo $text;
    exit;


    3) сохранил, зашел в вебмастер и он все равно выдает то же, что и было, как будто читает robots.txt (см картинку)
    Подскажите может что-то увидели не правильное в моих действиях?

    2018-03-13_20-42-00.png

×
×
  • Створити...

Important Information

На нашому сайті використовуються файли cookie і відбувається обробка деяких персональних даних користувачів, щоб поліпшити користувальницький інтерфейс. Щоб дізнатися для чого і які персональні дані ми обробляємо перейдіть за посиланням . Якщо Ви натиснете «Я даю згоду», це означає, що Ви розумієте і приймаєте всі умови, зазначені в цьому Повідомленні про конфіденційність.