El jue, 02-09-2010 a las 13:24 +0300, Yo'av Moshe escribió:
> um, maybe something like parts of the hostname, counting from the last
> one, like this:
>
>
> for "subdomain1.subdomain2.maindomain.com"
>
>
> ${hostpart0} == 'com'
> ${hostpart1} == 'maindomain'
> ${hostpart2} == 'subdomain2'
> ${hostpart3} == 'subdomain1'
> ${hostpart4} == None
>
{hostname} could act as a string or as an array of parts limited by '.'.
For example:
www.subdomain.domain.com
{hostname} -> www.subdomain.domain.com
{hostname}{0} -> www
{hostname}{1} -> subdomain
{hostname}{2} -> domain
{hostname}{3} -> com
{hostname}{4} -> <empty>
{hostname}{-5} -> <empty>
{hostname}{-4} -> www
{hostname}{-3} -> subdomain
{hostname}{-2} -> domain
{hostname}{-1} -> com
And you should be able to put different macros in the same rule, ie:
{hostname}{-1}{hostname}{-2} -> domain.com
What do you think?
Cheers,
Juanjo
--
jjm's home: http://www.usebox.net/jjm/
blackshell: http://blackshell.usebox.net/
ramble on: http://rambleon.usebox.net/
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee