How change Config (base_url) on a Controller - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: How change Config (base_url) on a Controller (/showthread.php?tid=81878) |
How change Config (base_url) on a Controller - lelolenda - 05-13-2022 I want build a website with subdomains, to a multi-language purpose, and that solution can help me. Code eg. Code: public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) RE: How change Config (base_url) on a Controller - InsiteFX - 05-14-2022 @includebeer, Has a very nice tutorial on how to do this multilingual website. Creating a multilingual website with CodeIgniter 4 He also has another tutorial for creating a website. RE: How change Config (base_url) on a Controller - pvt - 05-14-2022 You can store info in database then use code to detect valid domain. Idea: In admin controller, create CRUD to manager domain list: Code: //DATABASE TABLE domainList: Include to header file: Code: //check valid domain, $currentDomain = $_SERVER['SERVER_NAME']; |