summaryrefslogtreecommitdiff
path: root/doc/tips/convert_mediawiki_to_ikiwiki
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2010-11-22 23:13:52 +0000
committerSimon McVittie <smcv@debian.org>2010-11-22 23:13:52 +0000
commit8f64c69e084c698a389565203bd18bccb33f5d69 (patch)
tree8cfac53df0429dbd78fe32c0f19b34dcb1f02f6b /doc/tips/convert_mediawiki_to_ikiwiki
parent1968317cacc2f555af17286acf26a60ce616cc40 (diff)
Compute local paths to the top of the wiki
"local" here is short for "locally valid" - the idea is that we can use URLs that are relative in the sense of only having the path part, but absolute in the sense that they start from '/', such as '/~smcv/ikiwiki.cgi'. There's no particularly good name that I can find for these between-relative-and-absolute URLs. They're useful because in the common case where the pages and the CGI script have the same scheme and authority component, each page is identified by the same locally-valid URL when linking from any page or from the CGI, without hard-coding a choice between HTTP and HTTPS, or between multiple virtual hostnames with the same path layout. As such, we can use them in many situations that previously used an absolute URL. If there's no suitable semi-absolute value for local_url (for instance, if your pages and your CGI reside on different servers), we can just fall back to using the absolute URL. I append '/' because $config{url} doesn't end with '/', but the common case for local_url (on all branchable.com sites, for instance) is that it's just '/'.
Diffstat (limited to 'doc/tips/convert_mediawiki_to_ikiwiki')
0 files changed, 0 insertions, 0 deletions