[Mediawiki-l] 1.4.9 -> 1.5.0: external links as relative links ?

Rob Church robchur at gmail.com
Mon Oct 17 12:55:39 UTC 2005


As has been explained to you, such a link is NOT in fact valid XHTML,
so implementing it in MediaWiki is unlikely to happen.


Rob Church

On 17/10/05, ralf-buero at kruedewagen.de <ralf-buero at kruedewagen.de> wrote:
> Well, you are right.
> But then let me ask how I can add a link to mediawiki, which will then
> be parsed to
>
> <a href="../../foo">Foo Pages</a>
>
> I think there should be an official way to link from the wiki to
> another (virtual) server on the same box. I would name this a
> "relative link".
>
> Ralf
>
> On Saturday 15 October 2005 14:33, Rowan Collins wrote:
> > ralf-buero wrote:
> > > > But with 1.5.0 this syntax does not work anymore. It seems that
> > > > an external link MUST now start with http:// . My old links
> > > > like
> > > >
> > > > [http:../../mypage/ MyHTML Page]
> > >
> > > I have found out how to fix that.
> > > Just add "http:" to the url protocols variable in
> > > LocalSettings.php:
> >
> > Just so as you know, the reason this behaviour changed was because
> > such URLs are actually invalid according to the official
> > definitions - the "//" at the start is compulsory. Other than the
> > fact that it's always nice to adhere to the standards, beware that
> > not all browsers will treat such links the same - since there's no
> > official definition of what the URL "http:../../foo" means, you're
> > relying on coincidences of how the browser processes things. I've
> > no idea how widespread it is to treat "http:../" as equivalent to
> > "../", but I wouldn't rely on it unless I really had to.
> >
> > [See http://bugzilla.wikipedia.org/show_bug.cgi?id=787 for the
> > discussion that led to the fix.]
> >
> > > Does anybody know how I could use an external link to a page on
> > > the same server (aka relative link) without using an absolute
> > > http://<FQDN> ?
> >
> > You can use MediaWiki's {{SERVER}} variable to do exactly this -
> > basically, "[{{SERVER}}/myPage My Page]" should work. See
> > http://meta.wikimedia.org/Help:Variable for details and other
> > available varaibles.
> >
> > --
> > Rowan Collins BSc
> > [IMSoP]
>
>
>
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>



More information about the MediaWiki-l mailing list