Forum Discussion
Multiple http to https redirects
I have a VS setup with Layer 4 Performance and listening on https. I would like to redirect multiple sites to our internal servers. Here is what I have so far for one of the site.
when HTTP_REQUEST { switch -glob[string tolower [HTTP::host]] { "123.abc.com" { HTTP::redirect "" } } }
For some reason it just won't connect. Once I get this working I will be adding more sites to this.
Thank you.
18 Replies
Hi,
Here the working irule :
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "123.abc.com*" { HTTP::redirect "https://server1/reports" } } }If you need to redirect the user to server1, you need the
orHTTP::redirect
commands.HTTP::respondBut if you need to forward the traffic to server1, you will need to add the following command :
node server1 443- ema_128890
Nimbostratus
Thank you for the quick reply. I have tested the irule and it is still not working. Maybe to give further information is that the ssl is pass-through to the web server. - I forget to mentioned that I think HTTP events are not available when you have a Performance L4 VS. You need to configure a Standard VS with SSL bridging (clientssl and serverssl profiles)
- Scott_Hopkins_8
Nimbostratus
That correct. You don't get HTTP events (L7) with a L4 VS.
- Yann_Desmarest_
Nacreous
Hi,
Here the working irule :
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "123.abc.com*" { HTTP::redirect "https://server1/reports" } } }If you need to redirect the user to server1, you need the
orHTTP::redirect
commands.HTTP::respondBut if you need to forward the traffic to server1, you will need to add the following command :
node server1 443- ema_128890
Nimbostratus
Thank you for the quick reply. I have tested the irule and it is still not working. Maybe to give further information is that the ssl is pass-through to the web server. - Yann_Desmarest_
Nacreous
I forget to mentioned that I think HTTP events are not available when you have a Performance L4 VS. You need to configure a Standard VS with SSL bridging (clientssl and serverssl profiles) - Scott_Hopkins_8
Nimbostratus
That correct. You don't get HTTP events (L7) with a L4 VS.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com