How work with parked domain names in Codeigniter?

226 views Asked by At

I have PHP web site based on Codeigniter and the same domain names parked to this hosting account and engine.

Problem is that Codeigniter is configured on only one domain name in file config.php. When I open other parked domain name then is running redirection on domain by default, and I see URL not which I opened site.

How I can configure Codeigniter for parked domain names? That web site will work from some domain names?

1

There are 1 answers

0
Lupin On

You could try setting the config for the base_url by catching the domain the user came to.

$config['base_url'] = $_SERVER['HTTP_HOST'];

However, are you sure the redirection is done by Codeigniter and not a the Server level or htaccess file?