帮助创建 Zend Framework 重定向
我正在尝试创建一个 mod 重写表达式以从 localhost/1234 重定向到 localhost/controller/action?param=1234。
我的 bootstrap.php 中有以下内容,它以 localhost/number 的形式重定向所有请求
$routePublic = new Zend_Controller_Router_Route_Regex('^[\d]+(\.[\d]+){0,1}$', array( 1 => '' ,'controller' => 'content', 'action' => 'public'));
,但是,我需要将参数传递给我的 publicAction。
感谢您的帮助。像我这样的新手比你想象的更欣赏它!
I'm trying to create a mod rewrite expression to redirect from localhost/1234 to localhost/controller/action?param=1234.
I have the following in my bootstrap.php, which redirects all requests in the form localhost/number
$routePublic = new Zend_Controller_Router_Route_Regex('^[\d]+(\.[\d]+){0,1}
However, I need to pass a param to my publicAction.
Thanks for the help. Newbies like me appreciate it more than you could ever believe!
, array( 1 => '' ,'controller' => 'content', 'action' => 'public'));
However, I need to pass a param to my publicAction.
Thanks for the help. Newbies like me appreciate it more than you could ever believe!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
请注意,“url_of_route”后面的“*”就像一个通配符,意味着它后面可以有任何内容
此外还有一个指向 好文章
try this:
note that the "*" after "url_of_route" is like a wildcard meaning anything can come after it
Also heres a link to a good article