newbie
newbie

Reputation: 24635

Magento 1.7 REST API nginx configuration

Magento 1.7 has new REST API and it also has new rewrite rules for .htaccess file. How can I rewrite new rules in 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]

Upvotes: 0

Views: 2412

Answers (1)

Theodores
Theodores

Reputation: 1209

Here you go:

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

Upvotes: 2

Related Questions