title: Apache permissions based on querystring
body: <p>I have an apache server where authentication is required, but there are some calls that need to be allowed for all.</p>
  
  <p>On off these calls is based on a query string for example: </p>
  
  <blockquote>
    <p>/foo/api.php?Token=123&amp;Task=DoStuff&amp;Result=json</p>
  </blockquote>
  
  <p>I taught that with a LocationMatch that this would have workd so i worked out this configuration:</p>
  
  <pre><code>&lt;LocationMatch ^/foo/api.php\?.*(Task=DoStuff).*&gt;
      Order Allow,Deny
      Allow from All
  &lt;/LocationMatch&gt;
  </code></pre>
  
  <p>But this doesn't let me pass the authentication (meaning i get a 401).
  If I just filter <code>^/foo/api.php</code> I get passed the authentication, but this isn't strict enough.</p>
  
  <p>Anyone has any idea how to configure this to check the Task parameter in the querystring?</p>
  
  <p>For authentication we are using kerberos, this is forced on the whole site
  This is our conf for kerb</p>
  
  <pre><code>LoadModule auth_kerb_module modules/mod_auth_kerb.so
  
  &lt;Directory /var/www/html&gt;
    Options FollowSymLinks
    AllowOverride All
    AuthType Kerberos
    Require valid-user
    AuthName "Kerberos Login"
    KrbMethodNegotiate on
    KrbMethodK5Passwd on
    KrbAuthRealms FOO.LOCAL
    KrbServiceName HTTP/server.foo.local@foo.LOCAL
    Krb5KeyTab /etc/httpd/conf/http.keytab
    Satisfy Any
    Order deny,allow
    Deny from all
    Allow from 192.168.72.90
    Allow from 192.168.72.91
    Allow from 192.168.72.94
    Allow from 192.168.72.95
    Allow from 127.0.0.1
  &lt;/Directory&gt;
  </code></pre>