I am getting a annoying problem with rewrite-using cherokee web-server.

I wish to convert:

=> to =>

However , the ?-sign messes in the cmd

$_GET : array('page'=>'mypage', '?cmd'=>'print')

Cherokee is set up with:

regexp: ^/(.*)\.phtml(.*)$
internal subst: /index.php?page=$1&$2

So my question: The proper way to "consumeInch the question-mark if there are any.



Try matching it clearly prior to the taking parentheses:

regexp: ^/(.*)\.phtml\??(.*)$

\? is really a literal ?, and also the following ? means "match or 1 occasions".