0

网址

somedomain.com/?_escaped_fragment_

试试看:

routes.escaped-fragment.type = "Zend_Controller_Router_Route_Regex"
routes.escaped-fragment.route = "\?_escaped_fragment_"
routes.escaped-fragment.defaults.controller = "index"
routes.escaped-fragment.defaults.action = "someaction"

但他没有看到 GET 参数 ?_escaped_fragment_ 并运行

IndexController::indexAction
4

1 回答 1

1

ZF 路由器仅在路径上运行,查询字符串参数在路由匹配发生之前被剥离,因此您将无法轻松完成此工作。您的选择是:

  • 更改 URL 结构
  • 在 .htaccess 中重写此 URL
  • 在执行标准路由之前扩展/替换默认路由器以检查查询字符串
于 2012-11-13T22:01:18.510 回答