求优化URL:http://localhost:92/frontend/web/posts/index.html?page=3&per-page=10 ,能优化成http://localhost:92/frontend/web/posts/index/page/3.html
重写yii的 yii\web\Request的 resolveRequestUri()方法,加入条件判断,这个不需要数据库保存,通过转化就可以完成。
我的这个文章是自定义url,任意自定义,是需要保存到数据库中通过查询匹配。