按照它的官网配置的教程:
http://www.yiiframework.com/doc-2.0/guide-rest-quick-start.html
新建
UserController
配置
config/web.php
还要再作其它操作吗?现在的情况是,所有的网站都404
了
配置了 rules 之后,全站报500。。。我也是醉了。
.htaccess配了吗?需要放在web目录下
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php [L]
慢慢看文档,官方都是说明吧