httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "P.Peti" <>
Subject [users@httpd] Rewrite question
Date Sat, 22 Nov 2003 19:06:18 GMT

I'd like to ask if anyone could help me in the following
The point is that I would like to control file access based
on the presence of a keyword in the query string part of the
url. So my .htaccess file looks like this:

RewriteEngine on
RewriteCond %{QUERY_STRING} keyword
RewriteRule ^(.*)$ $1 [E=DL_ALLOW:true]

<Files "*">
  Order Deny,Allow
  Deny from all
  Allow from env=DL_ALLOW

If configured like this, the server show a strange behavior:
the url rewrite does happen, eg. my php script receives the
DL_ALLOW variable if I uncomment the Deny part thus allowing
it to run, still if the Deny line is active, all files are
denied for the client.
Another interesting thing is that if I substitute the
rewrite section with a  simple SetEnv statement for testing,
everything works fine. (Unfortunately as far as I know
SetEnvIf does not work with query string)

The server version is 1.3.26 (Debian woody)

Is there something I got wrong here?

Thank you:


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message