| 28 | }}} |
| 29 | |
| 30 | === Redirector |
| 31 | |
| 32 | 1. Copy redirector/rediretor.html at accessible point. |
| 33 | {{{#!sh |
| 34 | $ cp redirector/rediretor.html /var/www/ |
| 35 | }}} |
| 36 | |
| 37 | Check redirect function at your browser, for example go to `http://.../redirector.html?http://google.com`. |
| 38 | |
| 39 | 2. Edit your `conf/trac.ini` file: |
| 40 | |
| 41 | Example options: |
| 42 | {{{#!ini |
| 43 | [extlinkrewriter] |
| 44 | format = /redrector.html?%s |
| 45 | namespaces = http,https,ftp |
| 46 | target = _blank |
| 47 | }}} |
| 48 | |
| 49 | Notice the underscore before `blank`. |
| 50 | |
| 51 | === Social Media Bookmark |
| 52 | |
| 53 | del.icio.us: |
| 54 | {{{#!ini |
| 55 | [extlinkrewriter] |
| 56 | format = http://del.icio.us/url?url=%s |
| 57 | namespaces = http,https |
| 58 | }}} |
| 59 | |
| 60 | Hatena bookmark: |
| 61 | {{{#!ini |
| 62 | [extlinkrewriter] |
| 63 | format = http://b.hatena.ne.jp/entry/%s |
| 64 | namespaces = http,https |
| 65 | }}} |
| 66 | |
| 67 | === Mix redirector and bookmark |
| 68 | |
| 69 | {{{#!ini |
| 70 | [extlinkrewriter] |
| 71 | format = /redirector.html?http://del.icio.us/url?url=%s |
| 72 | namespaces = http,https,ftp |
| 73 | target = _blank |
66 | | == Example |
67 | | |
68 | | === Redirector |
69 | | |
70 | | 1. Copy redirector/rediretor.html at accessible point. |
71 | | {{{#!sh |
72 | | $ cp redirector/rediretor.html /var/www/ |
73 | | }}} |
74 | | |
75 | | Check redirect function at your brower, e.g. goto !http://.../redirector.html?http://google.com . |
76 | | |
77 | | 2. Edit your `conf/trac.ini` file: |
78 | | |
79 | | Example options: |
80 | | {{{#!ini |
81 | | [extlinkrewriter] |
82 | | format = /redrector.html?%s |
83 | | namespaces = http,https,ftp |
84 | | target = _blank |
85 | | }}} |
86 | | |
87 | | === Social Media Bookmark |
88 | | |
89 | | del.icio.us: |
90 | | {{{#!ini |
91 | | [extlinkrewriter] |
92 | | format = http://del.icio.us/url?url=%s |
93 | | namespaces = http,https |
94 | | }}} |
95 | | |
96 | | Hatena bookmark: |
97 | | {{{#!ini |
98 | | [extlinkrewriter] |
99 | | format = http://b.hatena.ne.jp/entry/%s |
100 | | namespaces = http,https |
101 | | }}} |
102 | | |
103 | | === Mix redirector and bookmark |
104 | | |
105 | | {{{#!ini |
106 | | [extlinkrewriter] |
107 | | format = /redirector.html?http://del.icio.us/url?url=%s |
108 | | namespaces = http,https,ftp |
109 | | target = _blank |
110 | | }}} |
111 | | |