mod_rewrite rule to work with get method

Posted by Davi on Stack Overflow See other posts from Stack Overflow or by Davi
Published on 2010-05-01T17:45:18Z Indexed on 2010/05/01 19:27 UTC
Read the original article Hit count: 267

Filed under:
|
|
|
|

I'm using this rule:

RewriteRule    ^(.*)$ public/$1    [L]

and in public folder I use:

$url = $_GET['url'];

when I try to acess something on url using slash or it works fine and I get:

/cities/display/45   =>   Array ( [0] => cities [1] => display [2] => 45)   

But when I try to submit a form, i'm not able to acces the data:

/cities/?field1=value1&field2=value2   =>   Array ( [0] => cities)

How can I solve this? I need a rule that also gets form's submited values

Thanks

© Stack Overflow or respective owner

Related posts about mod-rewrite

Related posts about apache