ExitPlugin
Redirect links to external sites via a page of your choice, such as to remove topic names from HTTP referrer headers
Introduction
This plugin redirects links to external sites via a page of your choice. You might want to do that to display a disclaimer ("You are leaving TWiki, come back soon.") or to remove topic names from HTTP referrer headers.
Syntax Rules
This plugin does not extend TWiki markup syntax.
Examples
If ExitPlugin is installed, the following link should take you to
https://wiki.epap.nms.kcl.ac.uk/do/exit.cgi?url=http://www.google.com/
http://www.google.com/
Note that these links will not be affected if the
NOEXIT
setting lists
twiki.org
.
http://twiki.org/download.html
http://develop.twiki.org/
Known Issues
Cross linked images
Cross linked images (like the following) are not handled by this plugin and can still leak page names via HTTP referer headers.
<img src="http://www.example.com/logo.png" alt="Someone else's logo"/>
As images are loaded with the page (unlike links) no user action is needed to leak page names.
Plugin Settings
Plugin settings are stored as preferences variables. To reference a plugin setting write
%<plugin>_<setting>%
, i.e.
%INTERWIKIPLUGIN_SHORTDESCRIPTION%
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Redirect links to external sites via a page of your choice, such as to remove topic names from HTTP referrer headers
- Debug plugin: (See output in
data/debug.txt
)
- Disable exit page - sitewide (here), per web (in WebPreferences) or per topic
- Set DISABLEEXITPLUGIN = 0
- URI schemes to be redirected
- Hosts for which no exit page should be shown.
- Set NOEXIT = .bygrave.me.uk .ibygrave.no-ip.org
- External link marks (you can use an image if you want). These are optional.
- Set PREMARK =
- Set POSTMARK =
- #Set POSTMARK =
- Set MARKSINLINK = off
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
- Download the ZIP file from the Plugin web (see below)
- Unzip
ExitPlugin.zip
in your twiki installation directory. Content: File: | Description: |
data/TWiki/ExitPlugin.txt | Plugin topic |
data/TWiki/ExitPlugin.txt,v | Plugin topic repository |
lib/TWiki/Plugins/ExitPlugin.pm | Plugin Perl module |
bin/exit.cgi | CGI script to generate the redirction page |
- Visit
configure
in your TWiki installation, and enable the plugin in the {Plugins} section.
- Test if the installation was successful:
- Click on links in above examples, and check that they are redirected via
https://wiki.epap.nms.kcl.ac.uk/do/exit.cgi?url=
- Check that internal links do not redirect. Fix the setting of
NOEXIT
if they do.
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins