3

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?

Nicolás Ozimica
  • 9,481
  • 5
  • 38
  • 51
egis
  • 1,404
  • 2
  • 11
  • 24

1 Answers1

0

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
  • 5,493
  • 1
  • 16
  • 20
  • 2
    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 Sep 03 '10 at 18:31