0

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?

Zelf
  • 1,723
  • 2
  • 23
  • 40
  • 1
    Isn't the point of enabling rewrites to get index.php out of the url? – Sam Dufel Jul 11 '13 at 18:31
  • most certainly it is and that is why we have it enabled. To explain, there are 3rd party applications that we need to access our site that have hardcoded in "index.php" in the url. When we were running on Apache with mod rewrite enabled we could call the api either way. Sorry, should have explained that as it seems counter intuitive. – Zelf Jul 11 '13 at 18:37
  • I'm not a nginx expert by any means, but shouldn't I be able to add a rewrite for http://www.mysite.com/index.php/api to http://www.mysite.com/api somehow in my nginx conf? – Zelf Jul 11 '13 at 19:29
  • paste your nginx config please – Mohammad AbuShady Jul 11 '13 at 21:48
  • The issue was in fastcgi_params. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; we needed to change it to: fastcgi_param SCRIPT_FILENAME $fastcgi_script_name; Now no problems with "index.php" in the url for Magento. Thanks. – Zelf Jul 15 '13 at 14:53
  • You can post this as an answer to your own question, that way the next person that comes along will see it. – Steve Robbins Jul 26 '13 at 16:17
  • you haven't really shared your nginx config with us to look into it. – Mohammad AbuShady Aug 02 '13 at 05:05

0 Answers0