cancel
Showing results for 
Search instead for 
Did you mean: 

Hosting 2 domains on CGI

Plusnet Staff
Plusnet Staff
Posts: 12,169
Thanks: 18
Fixes: 1
Registered: 04-04-2007

Hosting 2 domains on CGI

For anyone that wants to host 2 domains on the CGI server in different directories you can use the following.

Create an index.php file containing the following

Quote

<?php
if ($_SERVER['HTTP_HOST'] == "www.domain1.com") {
header("Location: http://www.domain1.com/folder1");
} else {
header("Location: http://www.domain2.com/folder2");
}
?>