socialog /
Socialog 的 SEO 模块
dev-master
2013-11-10 13:35 UTC
Requires
- socialog/socialog: dev-master
This package is not auto-updated.
Last update: 2024-09-28 13:40:48 UTC
README
Socialog 的 SEO 模块
此模块可以在不使用 Socialog 的情况下使用,它增加了以下功能
robots.txt
在 /robots.txt
上添加机器人文件,可以通过 module.config.php 配置,因此您可以在开发或生产环境中轻松地使用不同的 robots.txt
return array( 'socialog-seo' => array( 'robots' => array( // Which user agents are allowed 'user-agent' => '*', 'disallow' => array( // The routes which should be blocked for search engines ), ), 'content' => 'all', ) );
在开发环境中,您可以配置搜索引擎忽略网站,如下所示
return array( 'socialog-seo' => array( 'robots' => array( 'disallow' => array( '/' ) ), ) );
humans.txt
有关 humans.txt 的更多信息,请参阅 humanstxt
添加一个 humans.txt
路由,该路由服务 humans.phtml
视图
重定向
轻松配置 301 重定向
'socialog-seo' => array( 'redirect' => array( '/post/17' => '/manage-assets-in-zend-framework-2', '/post/16' => '/using-bootstrap-in-his-own-scope' ) )
或使用高级配置
'socialog-seo' => array( 'redirect' => array( '/post/17' => array ( 'url' => '/manage-assets-in-zend-framework-2', 'code' => 301 ) ), ),