https://github.com/flix-tech/mfbredirectbundle
https://github.com/flix-tech/mfbredirectbundle
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/flix-tech/mfbredirectbundle
- Owner: flix-tech
- License: mit
- Created: 2012-10-24T15:36:47.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2012-11-19T09:35:44.000Z (over 13 years ago)
- Last Synced: 2025-02-14T04:51:12.541Z (over 1 year ago)
- Language: PHP
- Size: 148 KB
- Stars: 2
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MFBRedirectBundle
## Description
This bundle adds an entity which you can manage with SonataAdmin to create redirects on the fly.
Very basic implementation and no fail-safes, but routing logic works like a charm.
Depends on Memcache at the moment.
## Credits
Thanks for the insight to routing to
http://php-and-symfony.matthiasnoback.nl/2012/01/symfony2-dynamically-add-routes/
## Install
Add this to your deps file on Symfony2.0
```
[MFBRedirectBundle]
git=git@github.com:meinfernbusde/MFBRedirectBundle.git
target=/bundles/MFB/RedirectBundle
[LiipDoctrineCacheBundle]
git=git@github.com:liip/LiipDoctrineCacheBundle.git
target=/bundles/Liip/DoctrineCacheBundle
```
Add to autoload.php
```php
'MFB' => __DIR__.'/../vendor/bundles',
```
Load bundle in your AppKernel.php
```php
new MFB\RedirectBundle\MFBRedirectBundle(),
```
Enable caching in your config
```yaml
liip_doctrine_cache:
namespaces:
# name of the service (aka liip_doctrine_cache.ns.mc)
mc:
namespace: mfb
type: memcache
# name of a service of class Memcached that is fully configured (optional)
# id: my_memcached_service
port: %memcache_port%
host: %memcache_host%
```
Add data to parameters.ini
```ini
memcache_host = localhost
memcache_port = 11211
```
Include bundle in your routing.yml
```yaml
MFBRedirectBundle:
resource: .
type: extra
```
### Last but not least:
Update your database, we use Doctrine migrations for that.
## License
This software is released under MIT License. Check LICENSE file for details.