. means every character
* means zero, one or more instances of the previous character.
^ means beginning of the line (or negation in some situations)
$ means end of line
The part of the regexp between the brackets will be returned as $1

So the first regexp ^(.*\/perl\/.*)$  says:
- If a line starts (^) with zero, one or more instances of any character
- followed by  /perl/ (the slashes are backslashed because it are
special characters)
- followed by zero, one or more instances of any character

result ==> the whole line without any end-of-line characters, if it
contains /perl/, Nothing if it doesn't contain /perl/

So a wild guess for the string you want to write:

^\/perl\/dl.pl(\/.*)$   http://127.0.0.1:8200/perl/dl.pl$1
But I guess the regexp you wrote first will work to !

Steven


On Wed, 2003-06-11 at 09:05, Frankie wrote:
> Hi guys
> 
> 
> I am hoping that on this list is a regex/apache guru...
> Currently, I have mdk9.0 running mod_perl/apache via virtual named hosts..
> 
> works great.
> 
> I can run mod_perl scripts in either of the following methods:
> 
> http://mydomain.com/perl/script.pl
> or 
> http://mydomain.com:8200/perl/script.pl
> 
> so the basic proxying works..
> 
> However only the latter URL works when passed params.. like so:
> http://mydomain.com:8200/perl/script.pl?id=something&function=stuff
> (that one works)
> 
> This one doesn't:
> http://mydomain.com/perl/script.pl?id=something&function=stuff
> 
> when I try that I always get the message that script.pl can't be found.
> 
> Since its an internal proxy, I can't see what the regex has grabbed.
> This is the regex in question in the vhosts file:
> 
> RewriteRule ^(.*\/perl\/.*)$  http://127.0.0.1:8200$1 [P]
> 
> I tried adding this one too in an effort to be more specific.. but it
> didn't work either:
> 
> RewriteRule /perl\/dl.pl/(.*)  http://127.0.0.1:8200/perl/dl.pl$1 [P]
> 
> What I don't understand is this:
> .*
> 
> In my mind means '0' or more of 'anything'
> 
> so why is it not catching params??
> 
> Can anyone point me in the right direction here?
> 
> 
> regards
> 
> 
> Franki
> 
> 
> 
> 
> ______________________________________________________________________
> 
> Want to buy your Pack or Services from MandrakeSoft? 
> Go to http://www.mandrakestore.com


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to