The docs should be updated with this new functionality.
Maybe a cookbook entry for www redirection.

-----Oorspronkelijk bericht-----
Van: Alvaro Lopez Ortega [mailto:[email protected]]
Verzonden: zondag 26 december 2010 20:10
Aan: Rene Klomp
CC: [email protected]
Onderwerp: Re: [Cherokee] All www redirect

On 26/12/2010, at 15:34, Rene Klomp wrote:

> I am trying to setup a www redirect for every (sub)domain name.
> 
> I've tried
> "^http\:\/\/www\.(.*)$" -> "http://$1";
> 
> but this is not working. I get a error 500 How can this be done 
> properly?

Truth be said, that was a missing feature on Cherokee... until now.

I have just committed a couple of patches that allow to perform this sort of 
redirections. If you want to give it a try, please use the repository code (>= 
r6016) and follow these steps:

 - Create a new virtual server, and use "Regular Expressions" in the "Host 
Match"
 - Add a regular expression to match the host names: www\.(.+)$
 - In the same Vserver, set a "Redirection" handler as the Default rule.
 - Add a Regex rule matching: /(.*)$, and substitution: http://^1/$1

^1,^2,^3,.. are substituted by the host name match.
$1,$2,$3,.. are substituted by either the handler match (if any) or it own 
match groups.

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

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

Reply via email to