On 27/04/14 02:01, zoglun wrote:
Hi everyone, We are holding about seven wikis on one linode serves. We used to create symbolic link under different dir. Unfortunately due to different wiki have different extension, database, and user habits. I can't set a single commonsetting.php for all wikis. We would like to move all the setting files to a common folder. However, nobody knows how to load different localsettings_XXX.php depends on requesting URL. I do read page https://www.mediawiki.org/wiki/Manual:Wiki_family but non of them work. I don't know why.
zoglun
How are the urls of your different wikis?
A sample snippet based on a working config:
/* Global config */ if (strpos($_SERVER['SERVER_NAME'], 'foobar.com') !== false) { /* Config wiki 1 */ } elseif (strpos($_SERVER['SCRIPT_URL'], '/wiki2') === 0) { /* Config wiki 1 */ } else { die("No wiki!!"); } /* Global config */