HTTPS redirects
Hello, I am a complete novice as far as f5 devices are concerned, and I need to achieve the following:
Any traffic to http://testssl.mydomainmail.co.uk gets redirected to https://testssl.mydomain.co.uk/login
Any traffic to http://testssl.mydomainmail.co.uk/anything gets redirected to https://testssl.mydomain.co.uk/anything (where “anything” could be any URL)
Any traffic to http://testssl.mydomain.co.uk/login gets redirected to https://testssl.mydomain.co.uk/login
Any traffic to http://testssl.mydomain.co.uk/xxxlz/anything gets redirected to https://testssl.mydomain.co.uk/xxxlz/anything (where xxx can be anything)
So far I have this:
• Any traffic to http://testssl.mydomainmail.co.uk gets redirected to https://testssl.mydomain.co.uk/login
1 when HTTP_REQUEST { 2if{ [HTTP::host] contains "http://testssl.mydomainmail.co.uk"} {
3 HTTP::redirect https://testssl.mydomain.co.uk/login [HTTP::uri]
• Any traffic to http://testssl.mydomain.co.uk/login gets redirected to https://testssl.mydomain.co.uk/login
1 when HTTP_REQUEST { 2if{ [HTTP::host] contains "http://testssl.mydomain.co.uk/login"} {
3 HTTP::redirect https://testssl.mydomain.co.uk/login [HTTP::uri]
Any help would be appreciated.