Download the PHP package autologic-web/redirect-bundle without Composer

On this page you can find all versions of the php package autologic-web/redirect-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package redirect-bundle

Symfony Redirect Bundle

Build Status StyleCI Maintainability Test Coverage

Configure redirections after a migration or structural changes to your app/website.

It catches exception events, if they are of type NotFoundHttpException it will look for a configured rule and return a RedirectResponse response to redirect the user.

Works for Symfony ^2.7, ^3.0 or ^4.0 with PHP ^5.6 or ^7.0

It's been designed to be as unobtrusive as possible since the need to do this sort of thing is often temporary - Google recommends leaving them in place for a year. Just include the bundle and add a block of configuration for your redirect rules.

Installation

Install via Composer

Symfony < 4

Include the bundle in AppKernel.php

Symfony 4

Include the bundle in bundles.php

Configuration

Basic Usage

pattern (string, required)

Use regular expressions to match the full URI being requested. The service catches 404 exceptions, uses preg_match to find a rule matching the missing page's URI before throwing the 404 in the event it cannot match.

redirect (string, required)

The fully qualified redirect URI. The bundle will set the protocol (http/https) based on the incoming original request so it ports from dev to prod easily.

status (int, optional)

Set the status code (default: 301) for the redirection. Tip: use 302 while debugging to avoid 301 permanent redirects from being cached in the browser.

forwarding (bool, optional)

Append the original route to the redirection (default: false). Useful in the case that other services/applications have their own redirect logic in place or route structure is the same on a different domain or path.

absolute (bool, optional)

Force absolute or relative redirects (default: null/auto). If left unset, it will detect a hostname in the redirect and either use the original request host if the redirect does not contain a host or use the redirect verbatim if it does.

protocol (string, optional)

Force the redirect protocol (default: null/auto). If left unset, it will detect the protocol from the original request and use that.

Other Examples

Logging

To enable logging of unmatched 404 errors, just inject a logger into the listener service in your services.yml:

This will log at notice level to help sniff out 404s that don't have any redirection rules in place.


All versions of redirect-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6|^7.0
symfony/http-foundation Version ^2.7|^3.0|^4.0
symfony/config Version ^2.7|^3.0|^4.0
symfony/dependency-injection Version ^2.7|^3.0|^4.0
symfony/http-kernel Version ^2.7|^3.0|^4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package autologic-web/redirect-bundle contains the following files

Loading the files please wait ....