ExpressionEngine
ExpressionEngine copied to clipboard
Add ability to forward URL parameters with template redirect tag
This will add a setting and functionality to optionally forward URL parameters when the {redirect=''}
tag is called in a template.
New setting in Settings
> Debugging & Output
:
Additionally, $config['redirect_forward_url_parameters'] = 'y';
(or 'n'
) can be added to config.php
to control this behavior instead of toggling it in the CP.
To test this, create a new template like redirect.group/index.html
with only {redirect='/'}
(or add a redirect tag to an existing template if that's easier).
With the new setting turned off, go to /redirect?utm_test=thing
in the browser, and you should land on the homepage without the URL parameters. Note the GET
URL and the Location
URL:
With the new setting turned on, go to /redirect?utm_test=thing
again, and you should land on the homepage with ?utm_test=thing
appended. Note the GET
URL and the Location
URL:
@matthewjohns0n we need a review here, with some accent on security audit