Hello there,

On 01/09/2010, at 10:21, Yo'av Moshe wrote:

> I'm trying to solve this using the new ${host} macro and I'm getting pretty 
> close, but I still need your help.
> 
> I'm just learning how to use RE, and this is what I came up with:
> 
> 1 - Creating a behavior rule based on host which is not my main domain
> 2 - Using a redirection handler with it.
> 3 - Choosing internal redirection.
> 4 - using this RE: ^/(.*)$ -> maindomain.com/${host}/$1
> 
> This seems to work fine, but ${host} gives me the whole hostname obviously.
> 
> How can I cut just the first part of it, before the dot? (something like 
> host.split('.')[0] in python)

Currently strings can be sliced, but I'm afraid there is no way to split() them.

It's documented at the end of this page:

  http://www.cherokee-project.com/doc/config_virtual_servers_evhost.html

What new variables would you need, BTW?

Cheers,

--
Octality
http://www.octality.com/

_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to