I'm confused, I tried several possibilities. All I want is to redirect all cgi-requests that DO NOT contain a certain parameter with all their other parameters to a different directory:

A request of nagios_atlas/extinfo.cgi?type=1&host=atlas_r1 should be redirected to nagios/extinfo.cgi?type=1&host=atlas_r1 because the requested url does not contain the parameter "&atlas".
A request of nagios_atlas/status.cgi?hostgroup=all&style=hostdetail&atlas should not be changed, because it contains "&atlas".