Last modified: 2012-07-31 06:08:01 UTC
Use http://www.mediawiki.org/wiki/Manual:$wgCanonicalServer as its value.
There is a 1000 more magic words I could come up with, I think it is reasonable to require a set of actual real-world use cases before we add more. I'm not objecting, just want to see some use cases so we can check if it is really needed or in need of something else.
(In reply to comment #1) > I'm not objecting, just want to see some use cases so we can check if it is > really needed or in need of something else. I saw some pages using {{SERVER}}{{SCRIPTPATH}}/api.php to show a link to api.php to users but now I can't fix it to show a correct link.
Why not? Protocol-relative urls are supported by MediaWiki. It works just fine, that's one the whole point of using protocol-relative urls. Especially in page output, I don't think there's any need (unless proven other wise) to use the canonical protocol. [{{SERVER}}{{SCRIPTPATH}}/api.php api.php] works just fine.
(In reply to comment #3) > Why not? Protocol-relative urls are supported by MediaWiki. It works just fine, > that's one the whole point of using protocol-relative urls. > > Especially in page output, I don't think there's any need (unless proven other > wise) to use the canonical protocol. > > [{{SERVER}}{{SCRIPTPATH}}/api.php api.php] works just fine. We want to show a visible URL, for example: You can send a request to {{SERVER}}{{SCRIPTPATH}}/api.php?action=purge&titles=PAGE_TITLES_HERE&forcelinkupdate to update links tables.