You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Jeff Chan <mi...@cyberdude.com> on 2000/11/01 06:39:38 UTC

mod_rewrite/6775: RewriteMaps in RewriteCond don't work

>Number:         6775
>Category:       mod_rewrite
>Synopsis:       RewriteMaps in RewriteCond don't work
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Tue Oct 31 21:40:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     mirage@cyberdude.com
>Release:        1.3.14
>Organization:
apache
>Environment:
Linux Redhat 6.2, g++/gcc 2.95.2 (whatever comes w/ rh6.2)
>Description:
In mass virtual hosting you may have a file vhost.map which has:
www.abc.com /home/httpd/abc
www.bcd.com /home/httpd/bcd
etc...

The lines
RewriteMap vhost txt:/pathto/vhost.map
RewriteCond ${vhost:${SERVER_NAME or HOST_NAME}} ^(/.*)$
RewriteRule ^/(.*) %1/$1

will always return simply /$1 because it seems that the ${vhost} always
returns a zero length string


>How-To-Repeat:
Try to do that mass virtual hosting ... instructions are found in a link
off the apache manual
>Fix:
Compiling apache 1.3.12 and using the exact same configs will fix the problem.
It also seems that the default install of apache1.3.12 has the same problem
as apache1.3.14... so perhaps it's not totally specific to 1.3.14.  
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]