You can put this code in your htaccess (which should be in the root folder)
RewriteEngine On RewriteCond %{QUERY_STRING} ^(.+?)\?(.+)$ RewriteRule ^site-page\.jsp$ /site-page.jsp?%1&%2 [R=302,L]
This code will be redirected
/site-page.jsp?content=mainpage?utm_campaign=somecampaign&utm_source=email
to
/site-page.jsp?content=mainpage&utm_campaign=somecampaign&utm_source=email
You now have these options:
content = mainpageutm_campaign = somecampaignutm_source = email
Note: feel free to change the 302 (temporary) redirect to 301 (permanent) redirect
EDIT
RewriteCond %{QUERY_STRING} ^(.+?)\?(.+)$ RewriteRule ^(.*)$ /$1?%1&%2 [R=302,L]
source share