httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: regex syntax
Date Thu, 26 Jun 1997 04:00:14 GMT
On Wed, 25 Jun 1997, Alexei Kosut wrote:
> Does anyone have any thoughts on the matter?

I've been trying to figure out how to implement the Alias regex thing
by using a Location that matches the regex... but I haven't been satisifed
with the syntax or the implications... i.e.

<Location ~ /foobar(.*)>
    Alias /path/to/$1
</Location>

The ()-pairs set $-values for the entire block.  But this poses so many
problems it's not worth it (consider nested <> blocks, you quickly need
scoping, and you start down the road to a full language).

I really would like to have a more uniform syntax throughout the config.
We have a lot of "string match this" arguments which fall into these
cases:

- direct match (w/ or w/o case)
- regex match (w/ or w/o case)
- ?* wildcarding match
- "domain matches" i.e. .foobar.com matching *.foobar.com
- "ip matches" i.e. 204.62.130. (we should add CIDR notation
    204.62.130.0/24, and bind &-netmask notation: 204.62.130.0&255.255.255.0)

We could quite easily have an expression parser that understood each
of those, and spat out a match_t, which is then executed at run time
against the appropriate input.

Dean


Mime
View raw message