I need to build app and i'm using codeigniter for this.
Company sends me a link in format that cant be changed from their side
Link is like:

```
someurl.com/sms.php?phone=12345678&msg=msg15&code=777&country=cc&oper=someoper& mssid=1234567892&notcharged=0&date=2011-12-26+23%3A31%3A27&keyword=msg&created=2011-12-26+23%3A31%3A26

```

How can i rewrite it with .htaccess so the codeigniter gets link in segmented format like

```
someurl.com/sms/myfunction/12345678/msg15/777/cc/someoper/1234567892/0/2011-12-26+23%3A31%3A27/msg/2011-12-26+23%3A31%3A26

```

Thanks

Edit.
Spent some hours and tried something like this:

```
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} ^phone\=([^&]+)\&msg\=([^&]+)\&code\=([^&]+)\&country\=([^&]+)\&oper\=([^&]+)\&mssid\=([^&]+)\&date\=([^&]+)\&keyword\=([^&]+)$
RewriteRule ^test\.php$ /sms/doParse/%1/%2/%3/%4/%5/%6/%7/%8 [R,L]

```

And then typing url like this:

```
http://test.airtel.lv/test.php?phone=12345678&msg=msg15&code=777&country=cc&oper=someoper&mssid=1234567892&date=2011-12-26+23%3A31%3A27&keyword=msg

```

I got this:

```
http://test.airtel.lv/sms/doParse/12345678/msg15/777/cc/someoper/1234567892/2011-12-26+23%253A31%253A27/msg?phone=12345678&msg=msg15&code=777&country=cc&oper=someoper&mssid=1234567892&date=2011-12-26+23%253A31%253A27&keyword=msg

```

Why returned url has GET params in the ending ?
And one more question, if that company will change and add extra param to link, the rewriting will be broken ? Then how can it be more universal ?