I try not to code on demand, maybe someone else has time to, but I don't. If you have some code you are working with that won't function properly I am happy to help you figure out how/why it's not working. There is some basic information about Mod_Rewrite Here
if you have not found it yet.
BTW There is really no 'one-size-fits-all' code for most rewrites =).