One Codeingniter installation. Multiple parked domains - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: One Codeingniter installation. Multiple parked domains (/showthread.php?tid=39492) |
One Codeingniter installation. Multiple parked domains - El Forum - 03-11-2011 [eluser]Andy UK[/eluser] I have a single Codeigniter installation, but various parked domains that lead to that one installation. I need to read which domain the user arrives by in order to feed the right Google Maps API key to the application (a different key for each domain) Is there a way to read the domain name and what should be done about the domain name registered in the config file. Can more than one domain name be used in a single installation? Thanks in advance! One Codeingniter installation. Multiple parked domains - El Forum - 03-11-2011 [eluser]theprodigy[/eluser] Take a look at the $_SERVER variable docs. It will give you the domain name that the user came in on. Code: <?php In your config file, just do something like: Code: <?php One Codeingniter installation. Multiple parked domains - El Forum - 03-13-2011 [eluser]Andy UK[/eluser] Cheers! That worked nicely |