One way to do this:
In your .htaccess file put
RewriteEngine on
RewriteBase /
RewriteRule process script.php
(process could really be anything)
Now any url such as www.yourdomain.com/process/16/17/58/16 will be processed by script.php which should be in the same directory as the .htaccess file.
Now either in your script.php or in a file that is included in script.php put the following code (from an article on this site by Tim Perdue):
$url_array = explode("/", $REQUEST_URI);
$var1 = $url_array[2];
$var2 = $url_array[3];
etc.
Now the variables are accessible to your script. There are other ways of doing this but this is the approach I had to use with my situation (not running as a module) and it works well.
Trevor DeVore
Blue Mango Multimedia