Results 1 to 4 of 4
-
07-28-2005, 04:41 PM #1Junior Guru Wannabe
- Join Date
- Mar 2003
- Location
- San Luis Obispo, CA
- Posts
- 38
2 domain names, same site, different style sheets
I'm looking for a way to create a web site with two different style sheets, each accessed from a different domain name.
In other words, I want to create the same information but if you come in through domain A you get a different look than if you come in through domain B.
I would prefer not to have to create two separate sites, because the info will change frequently. But I want people directed to domain A to see a different color, type style, other attributes, and different domain name from those who type in domain B.-------------
www.consciencesites.com
web design for nonprofits and small businesses
-
07-28-2005, 04:58 PM #2WHT Addict
- Join Date
- Nov 2003
- Posts
- 106
That can be accomplished by pointing both domains to the same hosting account, then using PHP to check the variable $_SERVER['HTTP_HOST'] and returning the appropriate style sheet. For example:
PHP Code:<?php
if ($_SERVER['HTTP_HOST'] == "www.domain1.com" || $_SERVER['HTTP_HOST'] == "domain1.com") echo "stylesheet1.css";
else echo "stylesheet2.css";
?>Krang
The Technodrome
-
07-28-2005, 05:17 PM #3Junior Guru Wannabe
- Join Date
- Mar 2003
- Location
- San Luis Obispo, CA
- Posts
- 38
Worth a shot! I have used php but not created it. I'll give it a try. Thanks!
-------------
www.consciencesites.com
web design for nonprofits and small businesses
-
04-27-2006, 10:09 PM #4New Member
- Join Date
- Apr 2006
- Posts
- 3
Actually, this will help me too thanks Krang!