You could probably place logic to handle this in a custom pipeline that runs before it resolves the item, which can parse the values of the Querystring and redirect to the appropriate page. An example of what I mean is below:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpRequestBegin>
<processor patch:before="processor[@type='Sitecore.Pipelines.HttpRequest.ItemResolver, Sitecore.Kernel']" type="Example.Components.Pipelines.ProcessPathResolver, Example.Components" />
</httpRequestBegin>
</pipelines>
</sitecore>
</configuration>
Then in your ProcessPathResolver
you could have code like this:
namespace Example.Components.Pipelines
{
public class ProcessPathResolver : HttpRequestProcessor
{
public override void Process(HttpRequestArgs args)
{
if (Sitecore.Context.Site.Name.ToLowerInvariant() == "shell" || args.Url.FilePath.Trim('/').ToLower().StartsWith("sitecore"))
return;
string requestUrl = args.Url.ItemPath;
string localPath = args.LocalPath;
var queryString = args.Context.Request.QueryString;
// Process the querystring parameters and redirect the user to the correct path
}
}
}
This new resolver would run before your items are resolved in the ItemResolver, and redirect to the correct page.