httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas -Balu- Walter>
Subject AliasMatch / minimal match?
Date Sun, 28 Jul 2002 16:13:02 GMT
Hello experts,

I am stuck in setting up a regex to be used in the AliasMatch-directive
in Apache.

I want to make it possible to access some of my virtual webspaces even
if Apache was not yet configured or DNS-update takes too long :)

My virtual webspaces can be found in a directory structure like


I wanted to make it possible to call that in a browser using:


To do so, I've tried to set up a directive like:

AliasMatch ^/vwww/(.*)\.(.*)/(.*)$ /home/vwww/$2/$1/htdocs/$3
                             ^^^^ path $3
                        ^^^^ $2
                  ^^^^ host $1

But since the regexp matches the longest possible match. I get the
following matches:

        $1 = host.example
        $2 = com

and not my needed result:

        $1 = host
        $2 =

I've tried to make the first (.*) a (.*?) to get minimal matching like
it is supported by perl(?), but Apache does not seem to support it? At
least it tells me that it can not compile the regexp while trying to
start it.

Any ideas or suggestions what regexp I am supposed to use?


PS: Same problem happens with the path:

gives me
        $1 = www.example
        $2 = com/some/path
        $3 = index.html
Windows is something like fast-food: 
It's finished in no time, but you don't get a full-filled feeling, and 
you can start again.                      - Bas Lijten (Holland) in #lfs

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message