flownative/rulebasedredirects

Implements rule-based redirects for Flow applications

Installs: 1 839

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 0

Open Issues: 0

Type:neos-package

v1.0.0 2022-08-09 14:35 UTC

This package is auto-updated.

Last update: 2024-10-09 19:42:42 UTC


README

MIT license Packagist Maintenance level: Friendship

Rule-Based Redirects for Flow

This package uses a PSR middleware to redirect requests to URLs using regular expression based rules.

It can be used to implement such redirect rules in cases where you cannot use the native ways of implementing them in your webserver (e.g. nginx or Apache httpd.)

Installation

composer require flownative/rulebasedredirects

Usage

As soon as the package is installed, the rules given in Flownative.RuleBasedRedirects.rules take effect. Here is an example:

Flownative:
  RuleBasedRedirects:
    rules: []
      - host: '/^www\.acme\.com$/'
        path: '/^\/foo\/(.*)$/'
        target: 'https://www.acme.com/elsewhere/$1'
        status: 301