How are you?
Summary: I'm trying to move my website from localhost to amazon-ec2 and almost any route brings "The requested URL example.com/xxx/yyy/ was not found on this server.
Context:
- Using codeigniter structure in public_html, applications and system.
- Web language in the URI. Example: localhost/public_html/es/main.
- For testing, one page (register) it's routed differently: localhost/public_html/admin/register.
- The page works from localhost.
Issue: I uploaded the page to my EC2, and when I try to access, almost every page shows the 404 error. Just register page works, but only if I call it via example.com/index.php/admin/register (example.com/admin/register carries the same 404 error).
Any advice or idea to explore would be very welcome!! Thanks!!
PS: In case it helps, I'm sharing my current routes.php code.
$route['default_controller'] = "main";
$route['404_override'] = '';
$route['^(en|es)/(.+)$'] = "$2";
$route['^(en|es)$'] = $route['default_controller'];