You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Giuseppe D'Ambrosio <gd...@cspnet.it> on 2001/05/03 15:24:32 UTC

rnd: with mod_rewrite on winNT

hi,

can anyone test something like this:

RewriteMap map1 rnd:conf/map1.txt
RewriteCond ${map1:random10} ^1$
RewriteRule (.jpg$) ??x2

(map1.txt is ,eg.:
______________
random16  1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16
random10  1|2|3|4|5|6|7|8|9|10
______________
)


I've tryied it both on 1.3.x and 2.0.x tree (winNT 4);

on 2.0.14a the server crashes
(I think the problem is in do_expand..)

on 1.3.12 I get *ever the same* (first) choice from the selected row of the map

I've been working on it for some days, filling the log file with every variable etc...
in the end I've got it to work replacing the C rand() with mt_rand()  (http://www.math.keio.ac.jp/matumoto/)

am I [very] idiot or what??


thanks,
--Giuse