flownative/rulebasedredirects

实现Flow应用的基于规则的跳转

安装量: 1,246

依赖项: 0

建议者: 0

安全性: 0

星标: 1

关注者: 4

分支: 0

公开问题: 0

类型:neos-package

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

This package is auto-updated.

Last update: 2024-09-09 19:31:09 UTC


README

MIT license Packagist Maintenance level: Friendship

基于规则的Flow跳转

本包使用PSR中间件,通过正则表达式规则将请求重定向到URL。

它可以在无法使用Web服务器(例如nginx或Apache httpd)的本地方式实现这些规则的情况下使用。

安装

composer require flownative/rulebasedredirects

使用

包安装后,Flownative.RuleBasedRedirects.rules中给出的规则立即生效。以下是一个示例:

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