Multi Domains same site differnt landing pages
PermalinkAll domains go to the home page and work great even keeps the correct domain in the URL. but One the landing pages i added an URL for each page and added the following to my index.php to redirect.
$DomainName = $_SERVER['SERVER_NAME']; $DomainName = str_replace('www.','', $DomainName ); if (preg_match ("/banana/i", $DomainName)) { $_SERVER[PATH_INFO] = '/bananaripeningrooms'; $DomainName = "BananaRipeningRooms.com" ; } elseif (preg_match ("/tomato/i", $DomainName)) { $_SERVER[PATH_INFO] = '/tomatoripeningrooms'; $DomainName = "TomatoRipeningRooms.com" ; } elseif ( preg_match ("/avocado/i", $DomainName)) { $_SERVER[PATH_INFO] = '/avocado-ripening-rooms'; $DomainName = "AvocadoRipeningRooms.com" ; } else { $DomainName = "dadeservice.com"; } require('concrete/dispatcher.php');
it works great, but my domains in the URL convert back to the main site domain in the site.php file.
Any Ideas
It will be difficult to direct the incoming request to a specific page based on the domain name. You might be able to accomplish this with a rewrite rule in the web server. For example, if a request comes in and it doesn't have anything in the path (i.e., the default page for the website), rewrite the request to include the landing page. All other pages should not be rewritten, of course.
http://www.concrete5.org/marketplace/addons/domain_mapper/...