Are you trying to make search-engine-friendly URLs?
If so, then you need to change your scripts to output friendly URLs, and then use mod_rewrite to change them back into the query-string form needed to call your script. mod_rewrite acts after an HTTP request is received, and before the content-handler is invoked. So, it does not affect the links that appear on your pages. Instead, it changes how URLs received in requests from clients are mapped to files on your server.