【发布时间】:2011-12-01 11:32:39
【问题描述】:
我不知道 Zend 框架的行为是否正常或有什么问题...
例如...如果我点击这样的链接:
<a href="<?= $this->url(array(
'controller' => 'SubCategory',
'action' => 'index',
'Category__ID' => 4)); ?>">
</a>
因此 URL(它将重定向到的位置)将是:www.mydomain.com/SubCategory/index/Category__ID/4
是否正确...
但现在我在这个 URL 的页面中:www.mydomain.com/SubCategory/index/Category__ID/4
我点击这样的链接:
<a href="<?= $this->url(array(
'controller' => 'Index',
'action' => 'index')); ?>">Home</a>
它将转到 URL:www.mydomain.com/Index/index/Category__ID/4
但是为什么呢?
不应该只是:www.mydomain.com/Index/index ????
为什么他还有GET参数?
这是正常行为还是我的应用程序有问题?如果出了什么问题,可能是什么?
再次感谢...
萨缪尔
【问题讨论】:
-
这是正常行为,您的问题是重复的。
-
对不起...我试图搜索至少 20 分钟但我没有找到答案...还是谢谢...:)
标签: zend-framework url redirect parameters get