You have many domains :
Users have to be redirect to http://john-doe.fr/example from http://www.john-doe.fr/example
Installation is a quick 3 step process:
- Download WozbeRedirectBundle using composer
- Enable the Bundle
- Configure your application's config.yml
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.
Enable the bundle in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new Wozbe\RedirectBundle\WozbeRedirectBundle(),
);
}
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