If you can tolerate having a PHP script filename in the URL, there is a simpler method that doesn't involve mod_rewrite.
If you have a script here:
http://www.example.com/myscript.php
And you call it with this URL:
http://www.example.com/myscript.php/arg1/arg2
You will have "/arg1/arg2" in $_SERVER['PATH_INFO']. You can then explode it on the slash to split it into an array.
For some reason this seems to be not very well known, even though PATH_INFO has been part of the CGI specification forever.