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".
I tried several things, but nothing worked. The last try was:
- Code: Select all
ReWriteRule ^nagios_atlas/(.*)(\.cgi)?(.*)!&atlas$ /nagios/%1.cgi?%2
Where is the mistake? I'm thankful for every hint.