Forum Discussion
sparkyeng_23072
Nimbostratus
Jul 16, 2018http to https redirect policy IPv6
Looking to redirect http to https on a IPv6 vip and our standard redirection policy doesn't seem to be working correctly.
Here's the current redirection rule:
tcl:https://[getfield [HTTP::h...
VernonWells
Employee
Jul 19, 2018It's because of the port split you are attempting to use, namely this bit:
getfield [HTTP::host] ":" 1
Since the IPv6 address itself it converted to a string using colons, you cannot use this mechanism to extract the port. You could do this:
getfield [HTTP::host] "]" 1
then re-add the closing square brace in the redirect, as in:
https://[getfield [HTTP::host] {]} 1]\][HTTP::uri]
or, if you know a port is not submitted (usually it's not if the port is 80 or 443 for TLS), simply don't try to remove the port.
Naturally, this means that you will need to use a slightly different rule for IPv4 Virtual Servers and IPv6 Virtual Servers.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects