DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:linkprefix

This is an old revision of the document!


linkprefix plugin

Compatible with DokuWiki

2009-12-25 "Lemming", 2010-11-07 "Anteater", 2011-05-25 "Rincewind", 2012-01-25 "Angua", 2012-10-13 "Adora Belle", 2013-03-06, 2013-05-10 "Weatherwax", 2013-12-08 "Binky"

plugin This plugin adds a custom string in front of all external URLs. That is useful for referer remove services.

Last updated on
2015-08-20
Provides
Render

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to refererremove

Tagged with links, modify, referer, remove

Purpose

I created this plugin to remove the HTTP referer most browsers send.

Why should someone want to remove the HTTP referer? I'm running a private wiki, which shouldn't be accessed by unauthorized people. If someone clicks a link in my wiki, the URL would probably transferred to the destination site. With this plugin I try to avoid this.

Updates

  • 2015-08-20: Code optimized.
  • 2014-01-04: An option to ignore URLs pointing to the same domain where dokuwiki is running added. (enabled by default)
  • 2013-11-12: Replaced PHP short open tag with <?php (thanks Richard)
  • 2013-05-12: Removed Java-Script, switched to HTML5.
  • 2010-03-28: Support for interwiki links added.

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Configuration

In order to use this plugin, you have to change the renderer_xhtml option in the configuration to linkprefix.

Customize

In the plugin configuration you can customize the string to add in front of an URL as you want. Default setting is to point to an included PHP script called redirect.php, which redirects after 1 second to the destination. This way the HTTP referer should be removed.

If you want to use an external service such as anonym.to, you can enter something like: http://anonym.to/?

Discussion

So nobody complains anything, I guess everything works fine with this plugin :o)

I don't think so. I've added the plugin, but it doesn't seem to work. In the Sourcecode there is still no thing like “http://anonym.to?”. Im using Angua. Is there any reset to trigger? THX

Did you change the renderer_xhtml option in your configuration? Please read the complete instruction above.
— Casper 2014/02/05 00:14

Thanks, worked. I thought the renderer_xhtml was the option provided by the plugin itself. Sorry, my bad.

Hi, I added this plugin and it almost worked right away. The only quirk is that I had to add '<?php' to the beginning of redirect.php, where it only started with '<?'. It refuses to render with only '<?' on my server.

Thanks for reporting. I'll fix that asap. — Casper 2014-06-10 16:50
plugin/linkprefix.1440026815.txt.gz · Last modified: 2015-08-20 01:26 by casper

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki