I am in the process of migrating my application to an AWS EC2 instance, but I am having the common issue of requests not being rewritten to index.php. I did some searching on the forums but none of the answers have been able to resolve the issue.
After some playing around I found the issue - Certbot (letsencrypt) added rewrite into the virtual server configuration for HTTP to force redirect to HTTPS, and the virtual server it created for the certificate did not have rewrites enabled.