12 Jun 2012 16:05
Cherokee 1.0.8 redirections and regex
Bertrand FRUCHET <astebert <at> gmail.com>
2012-06-12 14:05:52 GMT
2012-06-12 14:05:52 GMT
Hi,
I spent lot of time to make redirections available but it doesn't work.
I've to vservers :
- example.com with it's own SSL certificate
- example.fr with it's own SSL certificate
I what to redirect :
- http://example.com and http://www.example.com to https://www.example.com
- http://example.com/preprod and http://www.example.com/preprod to https://www.example.com/preprod
AND
- http://example.fr and http://www.example.fr to https://www.example.com
- http://example.fr/preprod and http://www.example.fr/preprod to https://www.example.com/preprod
I used the example on Cherokee website at http://www.cherokee-project.com/doc/cookbook_http_to_https.html
vserver example.com
- behavior rule : Force HTTPS (position on top of vserver behaviors), Final rule
- Rule type : Not SSL / TLS
- Handler : Redirection
- Rule type : External
- regular expression : /(.*)$
- substitution : https://${host}/$1
vserver example.fr
- idem rule
With this two rules, i redirect *example.com* to https://*example.com* and *example.fr* to https://*example.fr*
But i don't know how to redirect *example.fr* to https://*example.com*
Can someone help me ?
Thanks in advance,
Bertrand (French System Admin)
I spent lot of time to make redirections available but it doesn't work.
I've to vservers :
- example.com with it's own SSL certificate
- example.fr with it's own SSL certificate
I what to redirect :
- http://example.com and http://www.example.com to https://www.example.com
- http://example.com/preprod and http://www.example.com/preprod to https://www.example.com/preprod
AND
- http://example.fr and http://www.example.fr to https://www.example.com
- http://example.fr/preprod and http://www.example.fr/preprod to https://www.example.com/preprod
I used the example on Cherokee website at http://www.cherokee-project.com/doc/cookbook_http_to_https.html
vserver example.com
- behavior rule : Force HTTPS (position on top of vserver behaviors), Final rule
- Rule type : Not SSL / TLS
- Handler : Redirection
- Rule type : External
- regular expression : /(.*)$
- substitution : https://${host}/$1
vserver example.fr
- idem rule
With this two rules, i redirect *example.com* to https://*example.com* and *example.fr* to https://*example.fr*
But i don't know how to redirect *example.fr* to https://*example.com*
Can someone help me ?
Thanks in advance,
Bertrand (French System Admin)
_______________________________________________ Cherokee mailing list Cherokee <at> lists.octality.com http://lists.octality.com/listinfo/cherokee
RSS Feed