296

Product support

Visit this product's website for support.

Categories

What is a Redirect Condition?

When a positive match occurs in the redirect engine, all registered redirect conditions will be checked if they pass. If one of the conditions does not pass the redirect will not take place.

A redirect condition must implement RedirectConditionInterface.

Each redirect condition must have:

  • getCode() - A unique code.
  • getDescription() - A short description.
  • getExplanation() - A brief explanation on when or how to use it.
  • getFormConfig() - A form configuration array.
  • passes(RedirectRule $rule, string $requestUri) - Logic whether the condition passes with the given $rule and $requestUri.

Requirements

  • The Vdlp.Redirect plugin.
  • PHP 7.4 or higher.
  • October CMS 2.1 or higher.

Example

This plugin contains an detailed implementation example (plugin). This plugin can be found at GitHub.

This plugin contains an detailed implementation example (plugin). This plugin can be found at GitHub.

1.3.1

Maintenance release

Jun 12, 2023

1.3.0

Minimal required October CMS version 3.0

Jun 11, 2022

1.2.0

Minimal required October CMS version 2.1

Feb 20, 2022

1.1.3

Update plugin dependencies

May 28, 2021

1.1.2

Update README

Sep 18, 2020

1.1.1

Fix save events which causes redirect condition parameters to be emptied.

Sep 18, 2020

1.1.0

Add fix for deleted event (thanks to @NickolayCh)

Sep 01, 2020

1.0.1

Update plugin name and author

Mar 15, 2019

1.0.0

First version of Vdlp.RedirectConditions

Mar 15, 2019