Solution: Just in case anyone gets this problem, in my case the problem was that I followed a tutorial that insisted on disabling cgi.fix_pathinfo, in the php.ini file.
When setting cgi.fix_pathinfo =1, the problem fixed!
When setting cgi.fix_pathinfo =1, the problem fixed!