After the restful configuration in the yii2 framework is completed, you can use
api.test.com/index.php/users to access under apache
However, when accessing like this under nginx, a 404 error is reported
What is not done well?
phpcn_u15822017-05-16 17:12:04
Change the access address to: api.test.com/users
'urlManager' => [
'enablePrettyUrl' => true,
//'enableStrictParsing' => true,
'showScriptName' => false,
'rules' => [
['class' => 'yii\rest\UrlRule', 'controller' => 'user'],
],
]
The above is to beautify the route, which can be understood as removing 'index.php'