Hello Every One!

Can someone please point me in the right direction of how to rewrite some URLs to a cgi?

EG:

http://www.domain.com/paramater/value/paramater2/value2
to
http://www.domain.com/cgi-bin/script...amater2=value2

Thanks in advance