【发布时间】:2014-09-01 13:35:22
【问题描述】:
如何从 URL 中删除索引操作?
这是我在routes.php中的代码
Router::connect('/jobs/:slug',array('controller'=>'jobs','action'=>'index'));
所以基本上,我有这个网址:
http://example.com/jobs/index/pharmacist
但我想把那个改成
http://example.com/jobs/pharmacist
这个配置是纯粹在routes.php还是我需要编辑我的.htaccess,老实说我完全不知道。
您的帮助将不胜感激。谢谢!
【问题讨论】:
-
Read This (Cakephp URL rewriting) 并确保正确设置步骤 2。
标签: php cakephp routes url-routing