Forum Discussion
adrian_171483
Cirrus
Mar 11, 2015https matching
Hi,
I have an issue where we are re-directing http > https and adding some extra lines to a URI on the port re-direct.
When we target the Virtual server directly on HTTPS the re-direct is...
nitass
Employee
Mar 11, 2015but i guess it could re-direct in a loop without the matching condition.. as some of the requests are correct ??
yes, you have to check uri before redirect similar to the one Brain suggested.
this is just another example.
e.g.
[root@ve11c:Active:In Sync] config tmsh list ltm virtual bar443
ltm virtual bar443 {
destination 172.28.24.10:443
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
clientssl {
context clientside
}
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 13
}
[root@ve11c:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
HTTP::redirect "https://[HTTP::host]/something"
}
}
}
[root@ve11c:Active:In Sync] config curl -Ik https://172.28.24.10
HTTP/1.0 302 Found
Location: https://172.28.24.10/something
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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