![]() |
2 differents domains parked to the same website - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: 2 differents domains parked to the same website (/showthread.php?tid=15374) |
2 differents domains parked to the same website - El Forum - 02-02-2009 [eluser]Asinox[/eluser] Hi, i want to know something.... the CI config base_url() is something link that : http://domain.com now, what happen if i hav 2 domain's original domain: http://www.domain.com second domain : http://www.domain.com.xx and if i try to parked the second domain to the same website o webhosting.... there's not problem?? Thanks u 2 differents domains parked to the same website - El Forum - 02-02-2009 [eluser]xzela[/eluser] I have not tested this however it may work. You could try this: Code: $config['base_url'] = "http://" . $_SERVER['HTTP_HOST']; 2 differents domains parked to the same website - El Forum - 02-03-2009 [eluser]GSV Sleeper Service[/eluser] I can confirm that xzela's method works just fine. 2 differents domains parked to the same website - El Forum - 02-03-2009 [eluser]treehousetim[/eluser] [quote author="xzela" date="1233639014"]I have not tested this however it may work. You could try this: Code: $config['base_url'] = "http://" . $_SERVER['HTTP_HOST']; be careful if you're going to be using https 2 differents domains parked to the same website - El Forum - 02-03-2009 [eluser]GSV Sleeper Service[/eluser] 'nevercraft' came up with a neat little helper function to manage https stuff. code here 2 differents domains parked to the same website - El Forum - 02-03-2009 [eluser]Arjen van Bochoven[/eluser] [quote author="treehousetim" date="1233675787"][quote author="xzela" date="1233639014"]I have not tested this however it may work. You could try this: Code: $config['base_url'] = "http://" . $_SERVER['HTTP_HOST']; be careful if you're going to be using https[/quote] Or add an 's' to the protocol part of the uri if you're getting an https request: Code: $config['base_url'] = "http" . ($_SERVER['SERVER_PORT'] == 443 ? 's' : '') . "://" . $_SERVER['HTTP_HOST']; Arjen 2 differents domains parked to the same website - El Forum - 02-03-2009 [eluser]Asinox[/eluser] Thanks guy's ![]() ![]() ![]() thanks, thanks ![]() 2 differents domains parked to the same website - El Forum - 02-04-2009 [eluser]Asinox[/eluser] Im sorry ... i got error with my css, images, js files... i dont know why but... Thanks any way ![]() 2 differents domains parked to the same website - El Forum - 02-04-2009 [eluser]helmutbjorg[/eluser] You can simply do this Code: $config['base_url'] = "/"; 2 differents domains parked to the same website - El Forum - 02-04-2009 [eluser]Asinox[/eluser] ejje Thanks... super easy :d jejej |