Download the PHP package svetamor/robots_component without Composer
On this page you can find all versions of the php package svetamor/robots_component. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download svetamor/robots_component
More information about svetamor/robots_component
Files in svetamor/robots_component
Download svetamor/robots_component
More information about svetamor/robots_component
Files in svetamor/robots_component
Vendor svetamor
Package robots_component
Short Description create a file robots.txt
License BSD-3-Clause
Package robots_component
Short Description create a file robots.txt
License BSD-3-Clause
Please rate this library. Is it a good library?
Informations about the package robots_component
robots_component
В конфигурации прописать (пример):
'container' => [
'definitions' => [
\app\vendor\svetamor\robots\interfaces\ICreatingFile::class => [
'class' => \app\vendor\svetamor\robots\CreatingTxt::class,
'filePath' => '/robots.txt',
],
],
],
'modules' => [
'robots' => [
'class' => '\app\modules\Module',
'components' => [
'robotsComponent' => [
'class' => \app\vendor\svetamor\robots\RobotsComponent::class,
'userAgent' => [
'*' => [
'Disallow' => [
'/articles',
'/logs',
],
'Allow' => [
//..
],
],
'WebBot' => [
'Disallow' => [
'/',
],
],
],
'host' => 'site.ru',
'sitemap' => 'http://site.ru/sitemap.xml',
],
],
],
],
в контроллере:
$module = \Yii::$app->getModule('robots');
$response = \Yii::$app->response;
$response->format = \yii\web\Response::FORMAT_RAW;
$response->headers->set('Content-Type', 'text/plain');
return $module->robotsComponent->render();
All versions of robots_component with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
^2.0
The package svetamor/robots_component contains the following files
Loading the files please wait ....