I've configured basic Apache authentication for certain areas of a website that only administrators should have access to. Most web applications make this convenient by putting their admin pages in a subdirectory, so I configure authentication for the directory, such "/goodapp/admin". The problem is that some applications instead rely on the query string, eg.
/badapp/index.php?page=admin
Is there any way I can configure Apache to require authentication for a URL like this, based on the query string?