Skip to content

sitegeist/rulebasedredirects

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Implements rule-based redirects for Flow applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%