Routing for subdomain called instead of default method - 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: Routing for subdomain called instead of default method (/showthread.php?tid=76520) |
Routing for subdomain called instead of default method - JohnDoe - 05-20-2020 Hi, I'm trying to make a web that support subdomain for user. My route has something like this PHP Code: $routes->setDefaultNamespace('App\Controllers'); Using that route when I open subdomain (say sub.example.com) it will show 404 page which is work as expected. But now when I open the homepage (example.com) it will show 404 page instead of default method. When I comment theĀ $routes->get('(:any)', 'App\Errors:: show404', ['subdomain' => '*']); line, my homepage will show the default method. |