Rather then use mod_rewrite, you can use a Files directive to force a page to be parsed by php like this...
<Files "rates">
ForceType application/x-httpd-php
</Files>
Assuming you have a php fiel with no extension named precisely 'rates', when you enter http://my.site.com/rates/3/, Apache will only get the contents of /rates and /3 is ignored. This allows you to parse the page URI and get /3 into your script.
list(,$id) = explode("/", $_SERVER['PATH_INFO']);
Now you can add even more details to inject (if needed.) for example you could get 3, 4 from http://my.site.com/rates/3/4:
list(,$three,$four) = explode("/", $_SERVER['PATH_INFO']);