Plugin for Rewriting External Link URLs


Rewrite external link location, to hide referers for private sites, to use social bookmark sites, and so on.

For example, Trac link:

[ outgoing site]

becomes in html:

<a class="ext-link" href="">outgoing site</a>

But, ExtLinkRewriter converts it as:

<a class="ext-link" href="/myredirector.html?" target="_blank">outgoing site</a>

Jumping outgoing site via single redirector, referrers with detailed page names could be hidden. It is useful for private or restricted sites, for example project sites in local networks. This plugin contains simple redirectors.

Or, using bookmark site

<a class="ext-link" href="">outgoing site</a>


  1. Copy redirector/rediretor.html at accessible point.
    $ cp redirector/rediretor.html /var/www/

Check redirect function at your browser, for example go to http://.../redirector.html?

  1. Edit your conf/trac.ini file:

Example options:

format = /redrector.html?%s
namespaces = http,https,ftp
target = _blank

Notice the underscore before blank.

Social Media Bookmark

format =
namespaces = http,https

Hatena bookmark:

format =
namespaces = http,https

Mix redirector and bookmark

format = /redirector.html?
namespaces = http,https,ftp
target = _blank

Bugs/Feature Requests

Existing bugs and feature requests for ExtLinkRewriterPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from here.


You can check out ExtLinkRewriterPlugin from here using Subversion, or browse the source with Trac.


Make the egg package:

python bdist_egg

Copy egg into your Trac plugins directory:

cp dist/ExtLinkRewriter*.egg /where/to/trac/plugins/

To activate the plugin, edit your conf/trac.ini file:

ExtLinkRewriter.* = enabled

Recent Changes

4051 by bellbind on 2008-07-22 05:59:23
make compliant with trac 0.11
2186 by bellbind on 2007-04-20 03:14:11

change default rewrite format to send

2183 by bellbind on 2007-04-19 18:55:10

add site info in README.txt



Author: bellbind
Maintainer: bellbind

Last modified 18 months ago Last modified on Mar 7, 2021, 9:18:23 AM