CakePHP中不区分大小写的路由? [英] Case insensitive routing in CakePHP?

查看:45
本文介绍了CakePHP中不区分大小写的路由?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个URL,它是domain.com/Test/index路由到与domain.com/test/index相同的目的地。我已经看到了有关如何在特定页面上执行此操作的一些示例,但这对我不起作用。我希望网站中的所有网址均不区分大小写。在CakePHP网站上有办法吗?

I would like to have a url that is domain.com/Test/index route to the same destination as domain.com/test/index. I have seen some examples on how to do this for a specific page but this does not work for me. I would like all urls in my site to be case insensitive. Is there a way to do this in a CakePHP site?

推荐答案

您可能需要实现自定义的路由类。

You might need to implement a custom Routing class.

http ://book.cakephp.org/2.0/en/development/routing.html#custom-route-classes

这篇关于CakePHP中不区分大小写的路由?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆