wiki:ExtLinkRewriterPlugin

Version 10 (modified by bellbind, 17 years ago) (diff)

--

Plugin for Rewriting External Link URLs

Description

Rewrite external link location, for example, to hide referers for private sites.

For example, trac link:

[http://foo.bar.com outgoing site]

becomes in html:

<a class="ext-link" href="http://foo.bar.com">outgoing site</a>

But, ExtLinkRewriter converts it as:

&lt;a class=&#34;ext-link&#34; href=&#34;/myredirector.html?http://foo.bar.com&#34; target=&#34;_blank&#34;&gt;outgoing site&lt;/a&gt;

Jumping outgoing site via single redirector, referers with detailed page names could be hidden. it is useful for private/secret sites; e.g. project sites in local networks. (this plugin contains simple redirectors).

Or, using bookmark site; del.icio.us, you can specify the format:

format = http://del.icio.us/url?url=%s

Bugs/Feature Requests

Existing bugs and feature requests for ExtLinkRewriterPlugin are here.

If you have any issues, create a new ticket.

Download

Download the zipped source from [download:extlinkrewriterplugin here].

Source

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

Install

make egg

python setup.py bdist_egg

copy egg into your trac plugins dir.

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

Example

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

Check redirect function at your brower, e.g. goto http://.../redirector.html?http://google.com .

  1. edit conf/trac.ini

for enable the plugin:

[components]
ExtLinkRewriter.* = enabled

and example options:

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

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
ExtLinkRewriterPlugin:

change default rewrite format to send del.icio.us

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

add site info in README.txt

(more)

Author/Contributors

Author: bellbind
Contributors: