views:

111

answers:

1

Hello,

I have a problem with a question mark in url. For example I have url "test.com/controller/action/part_1%3Fpart_2" (where %3F is url encoded question mark). 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.

Thanks.

A: 

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.

biakaveron
It can be used, if it's escaped - "If the data for a URI component would conflict with the reserved purpose, then the conflicting data must be escaped before forming the URI." (from the link you gave). Also you can check here http://www.blooberry.com/indexdot/html/topics/urlencoding.htm about url encoding.In my example the question mark IS escaped (url encoded).
egis