Hello,
sorry, but <a href="../../foo.html">Foo Pages</a> is IMHO valid
XHTML,
isn't it ?
To summarize your postings (and to close this thread):
* There is no native way in mediawiki to create a relative link like
<a href="../../foo">Foo Pages</a> (i.e. linking from mediawiki to
another application running on the same server without using an
absolute path and without using a full qualified server name)
* A workaround with [http:../../mypage/ MyHTML Page] is not valid
XHTML, but works for most browsers
* A second workaround with [{{SERVER}}/myPage My Page] does "only"
provide a method for absolute paths. For many situations this might
help.
* A third workaround would be to create or use an extension
I don't want to critizise this. MediaWiki is great software. I am
using it with pleasure within my company. I try to push it whenever I
can. If you run mediawiki as a standalone (for example at wikipedia),
then mediawiki is perfect. But I run it within a complex company
infrastructure, running on a server with other (dynamic)
applications, running behind a reverse proxy and finally running on a
server with access from multiple IP interfaces.
I can live with this situation, but it might be useful for the future
to have an official syntax for relative links in mediawiki. This is
only a suggestion, don't worry ;-) If I understood it not correctly
then forgive me ...
Thanks for your great help
Ralf
On Monday 17 October 2005 14:55, Rob Church wrote:
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(a)kruedewagen.de <ralf-buero(a)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.