File to modify: wp-config.php
<?php
/* Domain detection – Xác định tên miền */
$host = $HTTP_HOST;
$parts = explode(’.',$host);
if ($parts[3] = "") {
$domain = $parts[0];
} else {
$domain = $parts[1];
}
/* Settings – Cài đặt */
switch ($domain) {
case "domain1": // "domain" in "www.domain.com"
$db = "database1"; // the database for this domain
$user = "username1"; // the username for this database
$password = "pass1"; // the password [...]
Full Story »