Skip to content

F19034 HTTP redirection from QFQ

Krzysztof Putyra requested to merge F19034HttpRedirection into develop
  1. Extended the functionality of _link column to generate HTTP redirections.
  2. Modified `Link::getRenderingMode()` to return a pair of numbers [$mode, $submode] instead of a string:
    • more than 10 rendering modes will be available in future,
    • the long switch statement in Link::renderLink() is simplified with if ... elseif ... else switch($mode) ... where the if-else part takes care of special cases and the switch statement has less cases.

HTTP redirection syntax

`SELECT 'p:/path-to-resource|r:9|h:<code-or-aliast>' AS _link`

where h: is an optional parameter with the default value 303; the supported status codes are explained in the ticket.

Test page: http://webwork20:46339/redirect

Merge request reports