URL包含%,%2f将是/和%3d a = In yii? [英] URL contain % ,%2f would be a / and the %3d a = In yii?

查看:134
本文介绍了URL包含%,%2f将是/和%3d a = In yii?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的yii中的网址是:

My url in yii is:

http://localhost/php_pro_106/reload/ByCustomer/mJYwIzoaIGe0R8lAVCqPhG%2Fg0jJFWjiWWdPnkq5VDlY%3D

我应该在url管理器中做什么来获得这个,我现在的规则是:

what should I have to do in url manager to get this,My current rule is:

'<controller:\w+>/ByCustomer/<giftcode>'=>'<controller>/ByCustomer',

其实问题是我得到:

The requested URL     /php_pro_106/reload/ByCustomer/mJYwIzoaIGe0R8lAVCqPhG/g0jJFWjiWWdPnkq5VDlY= was     not found on this server.

由于%3D %2F 在URL中。我需要做什么才能使其正常工作?

It is due to %3D %2F in the URL.What I have to do to make it work fine?

推荐答案

我知道apache在URL中有%2F 的问题,它总是用404回复,php脚本不执行。我从来没有找到方法。但是那是几年前。

I know apache has problem with %2F in URL, it will always reply with 404, php script is not executed. I never found a way around it. But that was some years ago.

编辑:

有一个解决方案,但它需要你可以编辑apache至少您的虚拟主机的配置文件(我当时没有)。然后,您必须在< VirtualHost> 中添加 AllowEncodedSlashes On 。或者您也可以将其设置为全局。

There's a solution, but it requires you can edit apache configuration file for your virtual host at least (I didn't have that at that time). Then you have to add AllowEncodedSlashes On inside your <VirtualHost>. Or you can also set it globaly.

这篇关于URL包含%,%2f将是/和%3d a = In yii?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆