We have magento rewrites on and are running on nginx with php-fpm. If the string "index.php" is in the url magento returns 404. e.g. http://www.mysite.com/index.php/api is a valid magento url, but it will return 404. If I drop index.php, so http://www.mysite.com/api, then it works.
How do I debug this in Magento to see why magento is saying index.php is not a valid page? Or better yet, has anyone seen this behavior and know how to fix it either in nginx or in magento?