Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 Yii 框架,并且有多个字母和驼峰形式的控制器和动作。例如。UserStatusController 和 RemoveStatus 等操作。
这使得 URL 必须是 www.website.com/userStatus/removeStatus。我更愿意将它们写为 www.website.com/user-status/remove-status 并让 mod_rewrite 为我更改它们。
任何人都可以就如何做到这一点提供任何建议吗?我没有任何运气理解 mod 重写规则。
我能够做到这一点。效果很好。
http://www.yiiframework.com/wiki/404/hyphenation-of-routes-in-url-management/