【发布时间】:2017-01-11 08:27:57
【问题描述】:
在 ZF2 中,我知道我可以创建一个 301 重定向,并附加如下查询字符串:
$options = [
'query' => [
'string' => 'hello world',
]
];
return $this->redirect()
->toRoute('myRoute', [], $options)
->setStatusCode(301);
但是,这会重定向到附加了 hello%20world 的 URL。在 ZF2 中,有没有办法编写这个重定向并附加 hello+world 代替?
【问题讨论】:
标签: php redirect zend-framework zend-framework2