To the best of my knowledge, the LocationMatch directive does not match query parameters. Your URL is "http://example.com/", and that is what you can match.
That should work. I just verified your code on my server to make sure I wasn't crazy. Are you sure you don't have a definition before this one that is taking precedence?
Create a test file in the folder on your server. Something like test.txt. You may find that you don't see it when you load that url in your browser. If that's the case then your definition above is getting skipped.
Best Answer
To the best of my knowledge, the LocationMatch directive does not match query parameters. Your URL is "http://example.com/", and that is what you can match.
You can use
mod_rewrite
to match the query string; the following is from the mod_rewrite documentation: