https://github.com/hafrit/permanentredirectionbundle
This bundle enable you to create infinite number of redirection from config file.
https://github.com/hafrit/permanentredirectionbundle
301 302 hafrit redirect-symfony redirection redirection-symfony symfony-bundle symfony-redirect symfony-redirection
Last synced: 9 months ago
JSON representation
This bundle enable you to create infinite number of redirection from config file.
- Host: GitHub
- URL: https://github.com/hafrit/permanentredirectionbundle
- Owner: hafrit
- Created: 2016-12-18T19:52:24.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T13:38:22.000Z (almost 9 years ago)
- Last Synced: 2025-06-01T18:40:27.867Z (10 months ago)
- Topics: 301, 302, hafrit, redirect-symfony, redirection, redirection-symfony, symfony-bundle, symfony-redirect, symfony-redirection
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PermanentRedirectionBundle
[](https://insight.sensiolabs.com/projects/5311cf99-0721-49de-887e-1b530451c650)
[](https://packagist.org/packages/hafrit/permanent-redirection-bundle)
[](https://packagist.org/packages/hafrit/permanent-redirection-bundle)
[](https://packagist.org/packages/hafrit/permanent-redirection-bundle)
This bundle enable you to create infinite number of redirection without using code.
- User bookmark a page of your site that does't exist anymore so he will have a beautiful 404 page.
- A link sent into an old mailing campaign and you want to redirect it instead of using controller redirection you can just configure your redirection.
## Install
### Step 1: Add to composer.json
```
"require" : {
// ...
"hafrit/permanent-redirection-bundle": "dev-master",
}
```
### Step 2: Enable the bundle
Enable the bundle in the kernel:
``` php
http://localhost/hello-world will be redirected to http://localhost/acme-hello-world with redirection code 301
- { source: "hello_with_parameters", target: "acme_hello_with_parameters", status: "302", keepParameters: true }
# "hello_world" => http://localhost/hello/firstName/lastName will be redirected with the same first and last name to http://localhost/acme-hello/firstName/lastName with redirection code 302
```