Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用urlencode传递重定向地址时的Magento-404_Php_Magento_Urlencode - Fatal编程技术网

Php 使用urlencode传递重定向地址时的Magento-404

Php 使用urlencode传递重定向地址时的Magento-404,php,magento,urlencode,Php,Magento,Urlencode,在Magento中,我有一个控制器,我在几个不同的位置引用它。控制器执行其操作后,应重定向 现在,我想把重定向地址作为一个参数传递,但是当我把它传递给地址时,我得到一个404错误 我使用的是urlencode,因此URL示例如下: http://localhost/magento/index.php/admin/operation/queueOrder/key/254f49caee2cc6e7533a92d45b48b24a/order_ids/[13]/redirect/http%3A%2F%

在Magento中,我有一个控制器,我在几个不同的位置引用它。控制器执行其操作后,应重定向

现在,我想把重定向地址作为一个参数传递,但是当我把它传递给地址时,我得到一个404错误

我使用的是urlencode,因此URL示例如下:

http://localhost/magento/index.php/admin/operation/queueOrder/key/254f49caee2cc6e7533a92d45b48b24a/order_ids/[13]/redirect/http%3A%2F%2Flocalhost%2Fmagento%2Findex.php%2Fadmin%2Fsales_order%2Fview%2Forder_id%2F13%2Fkey%2F1c5b6eb03a3d81f5286e8b15f11342fe%2F
如果我去掉
重定向
参数,它就会工作

我的问题是: 1.我走对了吗?有没有更好的方法传递重定向地址?
2.为什么我要买404?我正在重定向url上使用
urlencode
这是apache而不是magento的问题。当遇到编码的斜杠时,apache服务器将以404页面进行应答。出于安全原因,它被禁用,并且可以使用AllowEncodedSlash指令启用。我建议替换斜杠