2017 © Pedro Peláez
 

symfony-bundle redirect-manager-bundle

User gets ability to specify redirection through web GUI.

image

astina/redirect-manager-bundle

User gets ability to specify redirection through web GUI.

  • Monday, April 30, 2018
  • by pkraeutli
  • Repository
  • 17 Watchers
  • 4 Stars
  • 25,799 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 24 Versions
  • 15 % Grown

The README.md

Astina Redirect Manager Bundle

Build Status Latest Stable Version Total Downloads SensioLabsInsight, (*1)

Install

Step 1: Add to composer.json

"require" :  {
    // ...
    "astina/redirect-manager-bundle":"dev-master",
}

Step 2: Enable the bundle

Enable the bundle in the kernel:, (*2)

``` php <?php // app/AppKernel.php, (*3)

public function registerBundles() { $bundles = array( // ... new Astina\Bundle\RedirectManagerBundle\AstinaRedirectManagerBundle(), ); }, (*4)


### Step 3: Import routing file Import routing file of bundle. Change prefix attribute to suit your needs. In YAML: ``` yaml # app/config/routing.yml astina_redirect_manager: resource: "@AstinaRedirectManagerBundle/Resources/config/routing.yml" prefix: /redirect/

Step 4: Translations

If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config., (*5)

``` yaml, (*6)

app/config/config.yml

framework: translator: ~, (*7)

### Step 5: Configuration Options

In an application with multiple entity managers please [configure a new manager](http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html) or ensure the default manager can access the schema.
```yml
# app/config/config.yml
astina_redirect_manager:
    storage:
      entity_manager: redirect # Optional entity manager name, if ommitted default entity manager is used
    base_layout: "SomeBundle:SomeDir:index.html.twig"    # Override default Astina layout
    enable_listeners: false # Set to false to disable redirect listeners. Useful for service oriented architectures. Defaults to true

Step 6: Update your DB schema

``` bash $ php app/console doctrine:schema:update --force, (*8)


## Usage ### Importing urls with command Bundle knows how to import csv file of url for redirection. CSV has to contain two columns, where the first one contain urlFrom and second urlTo. ```bash $ php app/console armb:import /path/to/csv/file.csv [--redirect-code=302] [--count-redirects]

Using subDomain listener to redirect to somewhere else

If listener detects that subDomain is used it redirects visitor to url with name route_name with route_params and redirect code redirect_code., (*9)

# app/config/config.yml

astina_redirect_manager:
    redirect_subdomains:
        route_name:           ~ # Required
        route_params:
            param1: some-value
            param2: some-different-value
        redirect_code:        301

Warning, (*10)

You have to set parameter router.request_context.host in parameters.yml file. Otherwise value localhost will be used as domain name., (*11)

# app/config/parameters.yml

# ...
router.request_context.host: example.com
# ...

The Versions

30/04 2018

dev-master

9999999-dev http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

30/04 2018

3.4.0

3.4.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

05/01 2017

3.3.2

3.3.2.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

03/11 2016

3.3.1

3.3.1.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

12/07 2016

3.3.0

3.3.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

11/07 2016

3.2.3

3.2.3.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

19/04 2016

3.2.2

3.2.2.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

14/03 2016

3.2.1

3.2.1.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

02/03 2016

3.2.0

3.2.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

27/03 2015

3.1.0

3.1.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

08/01 2015

3.0.2

3.0.2.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

11/12 2014

3.0.1

3.0.1.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

20/11 2014

3.0.0

3.0.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

The Development Requires

manager redirection redirect astina 302 301

18/08 2014

2.1.1

2.1.1.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

manager redirection redirect astina 302 301

11/07 2014

2.1.0

2.1.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

manager redirection redirect astina 302 301

18/04 2014

2.0.0

2.0.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

manager redirection redirect astina 302 301

26/03 2014

1.2.1

1.2.1.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

manager redirection redirect astina 302 301

26/03 2014

1.2.0

1.2.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

manager redirection redirect astina 302 301

18/06 2013

1.1.0

1.1.0.0 http://astina.ch

User gets ability to specify redirection through web GUI.

  Sources   Download

MIT

The Requires

 

manager redirection redirect astina 302 301

03/05 2013

1.0.4

1.0.4.0

  Sources   Download

03/05 2013

1.0.3

1.0.3.0

  Sources   Download

07/04 2013

0.1.2

0.1.2.0

  Sources   Download

15/02 2013

0.1.1

0.1.1.0

  Sources   Download

05/02 2013

0.1.0

0.1.0.0

  Sources   Download