Redirect URL to Post

Redirect URL to Post, Version 0.19.0: Custom Pass-Through Parameters

Now you can define your own URL parameters that will be passed through to the final URL.

The latest release of the Redirect URL to Post WordPress plugin comes with a small new feature: Now you can define your own URL parameters that will simply be passed through to the final URL.

Until now only some selected tracking parameters were allowed. These parameters help you track redirects in web statistics.

Now, if you need any custom parameters, you can whitelist them in the wp-config.php file. Simply define a constant with a comma-separated list of your URL parameter keys. If it is only one key, you naturally don’t use any commas.

Example

Add into wp-config.php:

define( 'CHATTY_MANGO_RUTP_PASS_THROUGH', 'go,do' );

This would pass through any parameters like …&go=there&do=that.

Background

In case you are wondering why we’re not saving ourselves the trouble of whitelisting URL parameters in the first place: It’s for the extra peace of mind. Remember that anyone can modify the URL and then run it on your site. A reserved parameter could trigger something on the post or page where the redirect ends. And all that would be cloaked by a redirect.

While I’m not aware of any actual case where this could happen, I prefer to be a bit more restrictive rather than having to deal with the damage if someone discovers a loophole. The site owner should always be in control.

Photo by Christoph Amthor

Christoph