![]() |
CodeIgniter base_url Configuration Issue - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: CodeIgniter base_url Configuration Issue (/showthread.php?tid=92728) |
CodeIgniter base_url Configuration Issue - carolynrichard - 04-09-2025 Hello, I’ve been working with CodeIgniter for a while, and it's been great so far. However, I’m having trouble understanding how base_url works. For instance, I’ve set the base_url like this: Code: $config['base_url'] = 'http://Office-Inventory/'; But when I try to access http : // Office-Inventory/, I get a 404 Not Found error: Code: Not Found The requested URL was not found on this server. Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12 Server at dict-inventory Port 80 Interestingly, when I use http :// localhost:8000/, everything works as expected, and I can access all the controllers using base_url() or site_url(). I’m confused because I expected http://Office-Inventory/ to work as well. Can anyone explain why it gives a 404 error, but http : //localhost:8000/ works fine? |