You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "P.Peti" <pp...@freemail.hu> on 2003/11/22 20:06:18 UTC
[users@httpd] Rewrite question
Hi,
I'd like to ask if anyone could help me in the following
situation:
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
</Files>
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:
PP.
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org