开发者

Question mark in url (Apache)

开发者 https://www.devze.com 2023-01-14 03:50 出处:网络
I have a problem with a question mark in url. For example: I 开发者_开发知识库have the url test.com/controller/action/part_1%3Fpart_2 (where %3F is url encoded question mark), and with this rewrite r

I have a problem with a question mark in url.

For example: I 开发者_开发知识库have the url test.com/controller/action/part_1%3Fpart_2 (where %3F is url encoded question mark), and with this rewrite rule: RewriteRule .* index.php/$0 [PT], it should be passed to framework I use (Kohana) as is. At least I thought so.

The problem is that everything after the url encoded question mark is being treated as GET parameter, so Kohana receives only the part_1 and I can see that there is an array key part_2 in $_GET. I think it's web servers problem (apache 2.2).

What should I do so apache wouldn't treat url encoded question mark as a GET parameter indicator?


Question mark is one of the reserved characters, used as separator between PATH and QUERY components. So, you cant use it as a part of URI path.

0

精彩评论

暂无评论...
验证码 换一张
取 消