Bug 9770 - RewriteMap MapType 'rnd' not working
Summary: RewriteMap MapType 'rnd' not working
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_rewrite (show other bugs)
Version: 2.0.36
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
: 9783 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-11 13:01 UTC by Francesco Russo
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Russo 2002-06-11 13:01:17 UTC
[Previous ref: PR 10090 - Pablo Delgado -] 

I compiled Apache 2.036 using:
./buildconf
./configure --with-mpm=worker \
\
--enable-access \
--enable-alias \
--enable-auth \
--enable-cgi \
--enable-rewrite \
\
--disable-actions \
--disable-cgid \
--disable-asis \
--disable-auth_anon \
--disable-autoindex \
--disable-env \
--disable-imap \
--disable-include \
--disable-isapi \
--disable-status \
--disable-userdir

make
make install

Then I configured a Virtual Host like this:

<VirtualHost 123.123.123>
RewriteEngine on
RewriteMap random rnd:/home/httpd/randomrew.txt
RewriteRule ^/testrnd/index.html$  http://${random:tot1} [R]
</VirtualHost>

'randomrew.txt' contains:
tot1 www.site1.com/|www.site2.com/|www.site3.com/

Only happen the redirect to 'www.site1.com' [the first in the list].

The same rewrite worked without any problem in all Apache 1.3.1x versions.
Comment 1 Jeff Trawick 2002-06-11 14:57:06 UTC
This has now been fixed.  We just missed the cutoff for 2.0.37, so expect the
fix in 2.0.38.  For now, you can use this small patch to mod_rewrite:

http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/mappers/mod_rewrite.c.diff?
r1=1.121&r2=1.122

Thanks for your report, and thanks for using Apache!
Comment 2 Joshua Slive 2002-06-11 22:01:39 UTC
*** Bug 9783 has been marked as a duplicate of this bug. ***