Welcome Guest, Not a member yet? Register   Sign In
2 differents domains parked to the same website
#1

[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

[eluser]xzela[/eluser]
I have not tested this however it may work.

You could try this:
Code:
$config['base_url'] = "http://" . $_SERVER['HTTP_HOST'];
#3

[eluser]GSV Sleeper Service[/eluser]
I can confirm that xzela's method works just fine.
#4

[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'];
[/quote]

be careful if you're going to be using https
#5

[eluser]GSV Sleeper Service[/eluser]
'nevercraft' came up with a neat little helper function to manage https stuff.
code here
#6

[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'];
[/quote]

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
#7

[eluser]Asinox[/eluser]
Thanks guy's Smile for u help Smile im finished to register the another domain, now ill test Smile

thanks, thanks Smile
#8

[eluser]Asinox[/eluser]
Im sorry ... i got error with my css, images, js files... i dont know why but...

Thanks any way Big Grin
#9

[eluser]helmutbjorg[/eluser]
You can simply do this

Code:
$config['base_url'] = "/";
#10

[eluser]Asinox[/eluser]
ejje

Thanks... super easy :d jejej




Theme © iAndrew 2016 - Forum software by © MyBB