integration1Add my vote for this tag linking1Add my vote for this tag create new tag
, view all tags


Redirect links to external sites via a page of your choice, such as to remove topic names from HTTP referrer headers


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.


If ExitPlugin is installed, the following link should take you to http://twiki.org/cgi-bin/exit.cgi?url=http://www.google.com/


Note that these links will not be affected if the NOEXIT setting lists 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)
    • Set DEBUG = 0

  • Disable exit page - sitewide (here), per web (in WebPreferences) or per topic

  • URI schemes to be redirected
    • Set SCHEMES = http https

  • 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 http://twiki.org/cgi-bin/exit.cgi?url=
    • Check that internal links do not redirect. Fix the setting of NOEXIT if they do.

Plugin Info

Plugin Author: TWiki:Main.IanBygrave
Copyright: © 2006-2009 TWiki:Main.IanBygrave
© 2006-2010 TWiki:TWiki.TWikiContributor
Plugin Version: 2010-12-12 (V1.6)
Change History:  
2010-12-12: TWikibug:Item6530: Doc improvements, changing TWIKIWEB to SYSTEMWEB -- TWiki:Main.PeterThoeny
13 Jan 2009: Remove tags from the url.
08 Jan 2007: New DISABLEEXITPLUGIN preference to allow per-web or -topic disabling of the plugin. Stop using deprecated handler.
21 Jul 2006: Make the set of redirectable URI schemes configurable with SCHEMES preference.
26 Mar 2006: Performance improvements.
24 Mar 2006: Add MARKSINLINK pref. Match more links.
22 Mar 2006: Add TWiki:Plugins.ExternalLinkPlugin functionality to ExitPlugin.
13 Feb 2006: Fix url escaping, which got removed by a previous change.
11 Feb 2006: The NOEXIT configuration parameter is now a whitespace seperated list of internal domains.
04 Feb 2006: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: CGI
Other Dependencies: none
Perl Version: 5.005
License: GPL (GNU General Public License)
Benchmarks: GoodStyle 95%, FormattedSearch 96%, ExitPlugin 95%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ExitPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ExitPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/ExitPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 ExitPlugin.md5 r1 manage 0.1 K 2010-12-13 - 05:55 PeterThoeny  
Compressed Zip archivetgz ExitPlugin.tgz r1 manage 6.1 K 2010-12-13 - 05:55 PeterThoeny  
Compressed Zip archivezip ExitPlugin.zip r21 r20 r19 r18 r17 manage 7.8 K 2010-12-13 - 05:55 PeterThoeny  
Unknown file formatEXT ExitPlugin_installer r1 manage 3.4 K 2010-12-13 - 05:55 PeterThoeny  
Edit | Attach | Watch | Print version | History: r29 < r28 < r27 < r26 < r25 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r29 - 2013-10-16 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.