Help talk:Link/a

From Meta, a Wikimedia project coordination wiki
(Redirected from Talk:Link/a/b)

This is the talk page for Link/a, Link/a/b, Help:Link/a, and Help:Link/a/b, see Help:Link#Subpage feature.

URLs[edit]

The specified behaviour for browsers and anything else operating with URLs is roughly like this:

  1. If URL is relative make it absolute adding scheme and "authority" (host)
  2. Split query (starting with ?) and/or fragment (starting with #) at the end
  3. Split scheme (up to first colon), if any, depending on scheme split "authority"
    The "authority" is the host plus other crap (e.g. a port number)
    For "http://an.example/path?query" the result is "/path"
  4. If there's no slash at the end pretend to add it for the next steps, result "/path/"
  5. Replace all "/./" by "/"
  6. Replace all "/whatever/../" by "/", but not "/../../".
  7. Repeat that until all "/whatever/../" are eliminated, keep (or strip?) remaining leading "/../" as hopeless case
  8. Remove trailing slash if it was added in step 4
  9. Reinsert scheme and "authority" (from step 3) in front of all
  10. Reinsert query at the end (from step 2), but not any fragment
  11. Fire (= HTTP GET in the case of http), repeat fire for redirect (up to a chosen maximum)
  12. Apply fragment (from step 2) to good result, or show error page

Demo: http://purl.net/xyzzy/home/./test/../../pub?foo#bar
Expected result after step 10: http://purl.net/xyzzy/pub?foo
Works more or less with my stoneage browser, although it gets several steps wrong. -- Omniplex (w:t) 10:10, 26 May 2006 (UTC)[reply]

Interesting. Other test:

http://meta.wikimedia.org/home/./test/../../wiki/Help:Link gives http://meta.wikimedia.org/wiki/Help:Link --Patrick 10:31, 26 May 2006 (UTC)[reply]

Unfortunately fullurl: and family won't let us play with paths above X in //meta.wikimedia.org/wiki/X, unless we do it "locally":
[{{fullurl:X}}/./test/../../Talk:Link/a] gives [1].
[{{fullurl:X/./test/../../Talk:Link/a}}] gives [{{fullurl:X/./test/../../Talk:Link/a}}].
-- Omniplex (w:t) 11:05, 26 May 2006 (UTC)[reply]

Have fixed?[edit]

Linking to an anchor of an ancestor does not work; attempting that gives a link to a page with the name consisting of the name of the ancestor followed by "/": [[../#See also]] gives Help talk:Link#See also. — From Link/a/b

As of now, it seems that [[../#See also]] is valid ? --Nullzero (talk) 11:37, 25 January 2013 (UTC)[reply]