sgsaid
Forum Replies Created
Viewing 1 replies (of 1 total)
-
Forum: Plugins
In reply to: Multiple domains using one WP install (not wpmu)The solution given by STDestiny is the simplest I have come across too. However, I host on IIS6 and the $HTTP_HOST was returning null and thus I got HTTP 500 error when I used the script as is.
I had to change that line, just like the original solution you referred, to make the config work :
$host = $_SERVER['HTTP_HOST'];
Place the following in a test.php and call it using https://www.yourdomain.com/test.php to check which will work for you:
<?php echo '<pre>'; var_dump($HTTP_HOST); var_dump($_SERVER['HTTP_HOST']); echo '</pre>'; ?>
One improvement can be made to the SWITCH statement in this wp-config.php file – add a default value to handle any erroneous situation. Add the following after the last ‘break;’ statement and put before the closing curly brackets:
default: // default config if everything fails $db = "defaultdb"; // the database for this domain $user = "defaultuser"; // the username for this database $password = "defaultpw";// the password for this database $hostname = "localhost"; // 99% chance you won't need to change this value $table_prefix = 'wp_'; // change for multiple installations in one database $wplang = ''; // change to localize wordpress (must have an MO file in wp-includes/languages)
Good thinking…STDestiny!
Viewing 1 replies (of 1 total)