RedirectSilent

Summary: Redirect pages without messages and without modifying links
Version: 1.3
Prerequisites:
Status: obsolete
Maintainer:
Categories: Links Obsolete

This recipe is obsolete.

Petko adjusted variable "$EnableRedirectQuiet" set to 2 so that it disables all "?from=pagename",
yet he also made it even better allowing to reverse it by adding "quiet=0" to just turn a single directive on.

Thanks Petko !


Can we please make it so that if "$EnableRedirectQuiet" is set to 2 that it disables all "?from=pagename" in links so we do not have to adjust it in every redirect directive?

If not, can you fix this recipe for PHP 7 and PHP 8?

This recipe is not obsolete. It is different than the "$EnableRedirectQuiet" method in that this recipe does not require any adjustment to any redirect directive. It removes ALL "?from=pagename" in links. The newer method requires EVERY redirect directive to be modified with quiet=1.

--gnuzoo


Questions answered by this recipe

How to get rid of the redirect message and get rid of the "?from=pagename" in links

Notes

Remove redirect message PmWiki displays in a page is easy with just setting

    $PageRedirectFmt = '';

The hard part is changing the URL so it does not show that same information


This recipe is not obsolete. It is different than the "$EnableRedirectQuiet" method in that this recipe does not require any adjustment to any redirect directive. It removes ALL "?from=pagename" in links. The newer method requires EVERY redirect directive to be modified with quiet=1. Can we make it so that if "$EnableRedirectQuiet" is set to 2 that it disables all "?from=pagename" in links so we do not have to adjust it in every redirect directive?

I fixed this plugin and a newer version is available for download.

--gnuzoo

Description

Note: From version 2.2.1, PmWiki core's redirect markup now accepts the quiet=1 additional parameter. See $EnableRedirectQuiet.

This recipe is based on CustomRedirects. This recipe requires no custom parameters in the (:redirect:) markup like CustomRedirects does. Every link is clean and no "redirected from" message is displayed on the page.

Installation

Copy RedirectSilent.phpΔ to your cookbook directory.

In your config.php:

include_once("cookbook/RedirectSilent.php");

or in your farmconfig.php enter:

include_once("$FarmD/cookbook/RedirectSilent.php");

Notes

Release Notes

  • Version 1.0 - Initial Release

Comments

See Also

Contributors

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.