Forum Discussion
KJ_50941
Jun 26, 2014Nimbostratus
irule redirect or rewrite
Hi
I need an irule to redirect from shortname: https://example to https://example.com/test
I used below irule , however shortname doesn't work, but if I type fully qualified domain works ju...
Cory_50405
Noctilucent
Try this:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] eq "example" } { HTTP::redirect "https://example.com/test" } }
Cory_50405
Jun 26, 2014Noctilucent
If the exact HTTP host they are trying to access is "example", then the iRule will work. This assumes that you are terminating SSL on this virtual server and have an HTTP profile applied to the virtual server. Otherwise, you won't have the visibility into the layer 7 HTTP data in order to do the comparison.
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