2 differents domains parked to the same website |
[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
[eluser]xzela[/eluser]
I have not tested this however it may work. You could try this: Code: $config['base_url'] = "http://" . $_SERVER['HTTP_HOST'];
[eluser]GSV Sleeper Service[/eluser]
I can confirm that xzela's method works just fine.
[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
[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
[eluser]Asinox[/eluser]
Thanks guy's for u help im finished to register the another domain, now ill test thanks, thanks
[eluser]Asinox[/eluser]
Im sorry ... i got error with my css, images, js files... i dont know why but... Thanks any way
[eluser]helmutbjorg[/eluser]
You can simply do this Code: $config['base_url'] = "/";
|
Welcome Guest, Not a member yet? Register Sign In |