Aiche_Hamid_241
Jun 25, 2012Nimbostratus
Https redirect and pool selection
Hi all
I need to write an irule doing two things :
1 - offload SSL and redirect http requests to https
2 - make a pool selection based on the object type requested
ex : for *.php --> send to pool php_pool
for * --> pool to static_pool
so it should look to something like :
http-->https
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
dispatch requests
when HTTP_REQUEST priority 501 {
switch -glob [HTTP::path] {
*.php { pool php_pool }
default { pool static_pool }
}
}
The problem : it looks like the dispatching section is never processed ! whats wrong with this code ?
Thanks for all
Hamid