Download the PHP package prodigious/symfony-multisite-bundle without Composer
On this page you can find all versions of the php package prodigious/symfony-multisite-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download prodigious/symfony-multisite-bundle
More information about prodigious/symfony-multisite-bundle
Files in prodigious/symfony-multisite-bundle
Package symfony-multisite-bundle
Short Description This bundle allows you to manage multisite in symfony application.
License MIT
Homepage https://github.com/nan-guo/Symfony-Multisite-Bundle.git
Informations about the package symfony-multisite-bundle
Symfony Multisite Bundle
The repository contains the Symfony multisite bundle for Symfony 3. This bundle allows you to manage multisite in symfony application.
- Each site can have its own database connection or use the same database.
- Each site can have diffirent locales
- Each site can have its own app folder and public folder
- Each site can have its own robots.txt
Structure public folder
Each sites first looks for assets in its own folder
For example (demo_2):
The site demo_2 will first look for the image chat.png in
/web/public/demo_2/imgs/chat.png
if this image does not exist, the file /web/imgs/chat.png will be used
Structure robots.txt
Each site can have its own robots.txt in the folder :
/robots/hostname.txt
if hostname.txt does not exist, the file /web/robots.txt will be used.
Installation
Setup
Then add these lines to your composer.json of your Symfony project:
Afterwards, initialize the bundle using
After the installation, the bundle will create some files in your project :
- sites/
- app/MultisiteKernel.php
And you need to modify some files :
Add these lines to .htaccess in the folder web:
Modifiy your app.php and app_dev.php in the folder web:
Replace
To
And Relace
To
Like this :
Instructions
There is a list of commands to manage your sites.
Create a new site
Get the list of sites
Disable a site
Enable a site
Delete a site
Synchronizer configuration
Attributes
Additional info
Author: Nan GUO
Company : Prodigious