httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: AliasMatch / minimal match?
Date Sun, 28 Jul 2002 16:17:57 GMT

On Sun, 28 Jul 2002, Thomas -Balu- Walter wrote:
> My virtual webspaces can be found in a directory structure like
>
> /home/vwww/example.com/host/htdocs/
>
> I wanted to make it possible to call that in a browser using:
>
> http://localhost/vwww/host.example.com/
>
> To do so, I've tried to set up a directive like:
>
> AliasMatch ^/vwww/(.*)\.(.*)/(.*)$ /home/vwww/$2/$1/htdocs/$3
>                              ^^^^ path $3
>                         ^^^^ example.com $2
>                   ^^^^ host $1
>
> But since the regexp matches the longest possible match

Here's the trick:

AliasMatch ^/vwww/([^.]*)\.([^/]*)/(.*)$ /home/vwww/$2/$1/htdocs/$3

[^.] means any character except the period.

I'm not sure if that will do exactly what you want, but it should give you
the idea.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message