CodeIgniter index.php front controller versus Apache mod_rewrite URL rewrite interoperability
0 reputation · 11 Oct 2026, 03:37 UTC
Assuming CodeIgniter 4.x, the goal is to confirm whether the index.php front controller can serve clean URLs without index.php in the path when the same application moves from a local Apache stack to a production server running Nginx.
The front controller expects the web server to rewrite requests to index.php. Local XAMPP often enables mod_rewrite by default, while production Nginx requires explicit try_files directives. If the rewrite layer is absent or misaligned, routing failures may look like CodeIgniter configuration errors rather than server interoperability issues.
Uncertainty remains about which layer owns URL resolution when base_url is environment-specific and the document root differs between environments.
Does CodeIgniter handle index.php omission internally, or must the web-server rewrite module fully map requests to the front controller? Should base_url be derived dynamically from the request host instead of being hard-coded per environment?