I analyzed the robots.txt file and found it was returning this error:
Fatal error: Uncaught exception 'Zend_Locale_Exception' with message
'Autodetection of Locale has been failed!' ....
i have set the locale in index.php:
$locale = new Zend_Locale('en_US');
and have set a static route to the robots file:
//robots.txt
$route = new Zend_Controller_Router_Route_Static(
'robots.txt',
array(
'module' => 'public',
'controller' => 'systemPages',
'action' => 'robots'
)
);
$router->addRoute('robots.txt', $route);
action:
function robotsAction()
{
$this->getResponse()->setHeader('Content-Type', 'text/plain');
$disallow = $this->_config->robots->toArray();
if(is_array($disallow)){
echo "User-agent: * \n";
foreach ($disallow as $dir) {
echo "Disallow: " . $dir . " \n";
}
}
}
--
View this message in context:
http://www.nabble.com/google-indexing-site-tp14995990s16154p14997161.html
Sent from the Zend Framework mailing list archive at Nabble.com.