承接 ricbra/robots-txt-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ricbra/robots-txt-bundle

最新稳定版本:2.0.1

Composer 安装命令:

composer require ricbra/robots-txt-bundle

包简介

Simple Symfony2 which generates robots.txt based on config setting

README 文档

README

After solving the same problem for the fifth time I thought it was time to create a Bundle for this problem. I did again an extensive search on any other available material but I guess everybody is solving this problem on his own. On KnpBundles.com and Packagist.org I couldn't find any Bundle for this. So I created this one instead.

The problem: your staging environment indexed in Google

We all have some different environments for your apps (staging, test, dev) and we all have experienced this in the past: Google indexed your staging environment and every now and then a real visitor ends up there. Of course you can IP-block the staging but this isn't always feasible.

Solution for Symfony2: configurable robots.txt

Update your config.yml:

ricbra_robots_txt:
    allow_robots: %allow_robots%

In your parameters.yml file for production:

allow_robots: true

In your staging|dev|test parameters file:

allow_robots: false

Not really rocket science, but it works.

Installation

Composer ftw:

$ composer require ricbra/robots-txt-bundle

Then enable the bundle:

<?php
// app/AppKernel.php

$bundles = array(
    ...
    new Ricbra\Bundle\RobotsTxtBundle\RicbraRobotsTxtBundle(),
    ...
);

Update routing:

// app/config/routing.yml
ricbra_robots_txt:
    resource: "@RicbraRobotsTxtBundle/Resources/config/routing.yml"
    prefix:   /

统计信息

  • 总下载量: 5.49k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固