![]() |
domain alias with base_url - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1) +--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3) +--- Thread: domain alias with base_url (/showthread.php?tid=71172) |
domain alias with base_url - anthos1984 - 07-15-2018 Supposed I install CI in site: subdomain.maindomain.com which I have base_url subdomain.maindomain.com I also rent domain call www.otherdomain.com which is an alias for subdomain.maindomain.com. When I go to www.otherdomain.com, It will open subdomain.maindomain.com. So how to keep base_url to www.otherdomain.com when I use that domain for browsing? I mean to make 2 domains looks as separate domain. RE: domain alias with base_url - scalla - 07-15-2018 You might have to use cname record to achieve that. RE: domain alias with base_url - jreklund - 07-15-2018 You need to apply some PHP logic to be able to accept two urls in your base_url config. https://www.codeigniter.com/user_guide/installation/upgrade_300.html#step-19-make-sure-your-base-url-config-value-is-not-empty RE: domain alias with base_url - anthos1984 - 07-16-2018 Okay, thanks. So I need to check 'HTTP_HOST' for this detection |