wozbe/redirect-bundle

Symfony Bundle to manage domains

1.1.1 2013-10-15 15:08 UTC

This package is not auto-updated.

Last update: 2024-03-12 02:59:57 UTC


README

You have many domains :

Users have to be redirect to http://john-doe.fr/example from http://www.john-doe.fr/example

Installation

Installation is a quick 3 step process:

  1. Download WozbeRedirectBundle using composer
  2. Enable the Bundle
  3. Configure your application's config.yml

Step 1: Download WozbeRedirectBundle using composer

Add WozbeRedirectBundle in your composer.json:

{
    "require": {
        "wozbe/redirect-bundle": "*"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update wozbe/redirect-bundle

Composer will install the bundle to your project's vendor/wozbe directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Wozbe\RedirectBundle\WozbeRedirectBundle(),
    );
}

Step 3: Configure your application's config.yml

Finally, add the following to your config.yml

# app/config/config.yml
wozbe_redirect:
    domains:
        john-doe.fr:
            aliases:
                - www.john-doe.fr
                - www.johndoe.fr
                - johndoe.fr
        foo-bar.fr:
            aliases:
                - www.foo-bar.fr
                - www.foobar.fr
                - foobar.fr

======= A short bundle to manage many domains