jdMorgan - 3:11 pm on Aug 12, 2010 (gmt 0)
Please provide more specific examples of Google Analytics Adwords URLs which represent all possible requests for which you might want to keep the query string. What do these URLs look like? Are the links always to just "pages"? The reason I ask is that you do not want to waste CPU time checking for specific query strings when it is not really necessary.
The problem is almost never writing the code. The problem is almost always related to defining the requirements completely and correctly. By defining the requirements in terms of variables (character-strings in the hostnames, URL-paths, filetypes, query strings, etc.) that mod_rewrite can check, the solution often becomes fairly obvious.