【问题标题】:Route the default URL trailed with a named arg路由带有命名参数的默认 URL
【发布时间】:2013-02-22 17:22:19
【问题描述】:

我想知道当 url 后面有一个命名的 arg 时,如何正确路由默认控制器/动作。

I.E.:我想将 http://www.server.com/mode:full 路由到 http://www.server.com/users/index/mode:full

我尝试了Router::connect ('/:mode', array('controller'=> 'users', 'action'=> 'index'));,但它不起作用...

【问题讨论】:

    标签: cakephp routes named-parameters


    【解决方案1】:

    抱歉,它看起来独立于 CakePHP。 事实上,这是 Windows 上的 Apache,它将“:”识别为逻辑驱动器,因此根本不路由正确的(至少是预期的)URL。

    【讨论】:

      猜你喜欢
      • 2013-06-24
      • 1970-01-01
      • 2020-10-23
      • 2012-05-01
      • 1970-01-01
      • 2021-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多