2017 © Pedro Peláez
 

yii2-extension yii2-robots-txt

Module for generate robots.txt file by url rules

image

execut/yii2-robots-txt

Module for generate robots.txt file by url rules

  • Saturday, August 26, 2017
  • by eXeCUT
  • Repository
  • 1 Watchers
  • 2 Stars
  • 412 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 13 % Grown

The README.md

Yii2 module for generate robots.txt file by url rules

Installation

The preferred way to install this extension is through composer., (*1)

Install

Either run, (*2)

$ php composer.phar require execut/yii2-robots-txt "dev-master"

or add, (*3)

"execut/yii2-robots-txt": "dev-master"

to the require section of your composer.json file., (*4)

Configuration example

Add to application config folowing rules:, (*5)

[
    'components' => [
        'urlManager' => [
            'rules' => [
                ['pattern' => 'robots', 'route' => 'robotsTxt/web/index', 'suffix' => '.txt'],
            ]
        ]
    ],
    'modules' => [
        'robotsTxt' => [
            'class' => 'execut\robotsTxt\Module',
            'components'    => [
                'generator' => [
                    'class' => \execut\robotsTxt\Generator::class,
                    'host' => 'localhost',
                    'sitemap' => 'sitemap.xml',
                    //or generate link through the url rules
                    'sitemap' => [
                        'sitemapModule/sitemapController/sitemapAction',
                    ],
                    'userAgent' => [
                        '*' => [
                            'Disallow' => [
                                'noIndexedHtmlFile.html',
                                [
                                    'notIndexedModule/noIndexedController/noIndexedAction',
                                    'noIndexedActionParam' => 'noIndexedActionParamValue',
                                ]
                            ],
                            'Allow' => [
                                //..
                            ],
                        ],
                        'BingBot' => [
                            'Sitemap' => '/sitemapSpecialForBing.xml',
                            'Disallow' => [
                                //..
                            ],
                            'Allow' => [
                                //..
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
];

After configuration robots.txt file is opened by /robots.txt link, (*6)

License

yii2-robots-txt is released under the Apache License Version 2.0. See the bundled LICENSE.md for details., (*7)

The Versions

26/08 2017

dev-master

9999999-dev https://github.com/execut/yii2-robots-txt

Module for generate robots.txt file by url rules

  Sources   Download

Apache-2.0

The Requires

 

by Avatar eXeCUT

yii2 robots.txt

26/08 2017

1.2.2

1.2.2.0 https://github.com/execut/yii2-robots-txt

Module for generate robots.txt file by url rules

  Sources   Download

Apache-2.0

The Requires

 

by Avatar eXeCUT

yii2 robots.txt

13/07 2016

0.1.1

0.1.1.0 https://github.com/execut/yii2-robots-txt

Module for generate robots.txt file by url rules

  Sources   Download

Apache-2.0

The Requires

 

by Avatar eXeCUT

yii2 robots.txt