Код: Выделить всё
public function actionRobots()
{
$host = Yii::app()->request->hostInfo;
$host = preg_replace("/w+\./", '', $host);
$host = str_replace("http://", "", $host);
$this->renderPartial('robots', array(
'host' => $host,
'sitemap' => "http://$host/sitemap.xml",
));
}
Код: Выделить всё
User-Agent: *
Allow: /
Host: <?php echo "$host\n"; ?>
Sitemap: <?php echo "$sitemap\n"; ?>
Код: Выделить всё
'robots.txt' => 'sitemap/default/robots',
Код: Выделить всё
Длина: нет данных [text/html]
Код: Выделить всё
Длина: нет данных [text/plain]