Set cgi.fix_pathinfo to 0 in php.ini.