You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/06/15 20:19:49 UTC
DO NOT REPLY [Bug 35375] New: -
mod_rewrite doesn't handle environment variables correctly
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35375>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35375
Summary: mod_rewrite doesn't handle environment variables
correctly
Product: Apache httpd-1.3
Version: 1.3.26
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_rewrite
AssignedTo: bugs@httpd.apache.org
ReportedBy: pilop@difu.de
when using mod_rewrite to redirect whenever an env-variable is set
it fails matching the RewriteCond described in
http://httpd.apache.org/docs/mod/mod_rewrite.html#RewriteCond (Special Note: 2)
an example configuration that fails is:
RewriteEngine On
RewriteLog /tmp/rewrite.log
RewriteLogLevel 9
RewriteCond
%{ENV:HTTP_HOST} domain
RewriteRule ^/$ http://another.domain [R]
/tmp/rewrite.log says:
(2) init rewrite engine with requested uri /
(3) applying pattern '^/$' to uri '/'
(4) RewriteCond: input='' pattern='domain' => not-matched
(1) pass through /
in this case in env-variable is just _not_ substituted, as input=''.
when i'm using
RewriteCond %{HTTP_HOST} domain
instead of
RewriteCond %{ENV:HTTP_HOST} domain
everything works well (even debug-messages in /tmp/rewrite.log are ok)
unfortunately it's not as simple as using the working version instead of the
broken, but i need to rewrite based on environment-variables that are no
apache-server-variables.
when testing wheather the env-variable is correctly set, using a simple cgi,
it displays correct values for the env-variable.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org