I can match files just fine when using this
<Files foo-bar.php>
...
</Files>
however how do you match it if the string you're matching is like this?
<Files foo-bar.php?foo=bar>
...
</Files>
I can match files just fine when using this
<Files foo-bar.php>
...
</Files>
however how do you match it if the string you're matching is like this?
<Files foo-bar.php?foo=bar>
...
</Files>
As David points out, one way to work around this is to use mod_rewrite, but if you have Apache 2.4 or newer, you can use the If directive, which is a lot cleaner:
<Files foo-bar.php>
<If "%{QUERY_STRING} =~ /foo=bar/">
...
</If>
</Files>
Note that the argument of the directive is actually a regular expression. It's incredibly powerful.
This can't be done with standard Apache directives, as discussed here.
However, depending on what you're trying to accomplish, you might have some success with mod_rewrite.