Php Magento 1.7 REST API nginx配置

Php Magento 1.7 REST API nginx配置,php,magento,rest,nginx,magento-1.7,Php,Magento,Rest,Nginx,Magento 1.7,Magento 1.7有了新的REST API,还为.htaccess文件提供了新的重写规则。如何在nginx中重写新规则 ############################################ ## uncomment next line to enable light API calls processing # RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L] ##############

Magento 1.7有了新的REST API,还为.htaccess文件提供了新的重写规则。如何在nginx中重写新规则

############################################
## uncomment next line to enable light API calls processing

#    RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]

############################################
## rewrite API2 calls to api.php (by now it is REST only)

    RewriteRule ^api/rest api.php?type=rest [QSA,L]
给你:

location /api {
  rewrite ^/api/rest /api.php?type=rest break;
}