Help talk:Link/a
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
editThe specified behaviour for browsers and anything else operating with URLs is roughly like this:
- If URL is relative make it absolute adding scheme and "authority" (host)
- Split query (starting with ?) and/or fragment (starting with #) at the end
- 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"
- If there's no slash at the end pretend to add it for the next steps, result "/path/"
- Replace all "/./" by "/"
- Replace all "/whatever/../" by "/", but not "/../../".
- Repeat that until all "/whatever/../" are eliminated, keep (or strip?) remaining leading "/../" as hopeless case
- Remove trailing slash if it was added in step 4
- Reinsert scheme and "authority" (from step 3) in front of all
- Reinsert query at the end (from step 2), but not any fragment
- Fire (= HTTP GET in the case of http), repeat fire for redirect (up to a chosen maximum)
- 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)
- 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)
- 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)
Have fixed?
editLinking 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)