Forum Discussion
Phil_Nikray_728
Nimbostratus
Sep 19, 2014iRule redirect question
Hi all,
Could someone help me with configuring an iRule that redirects http://www.abc.com to https://www.abc.com:81
I have an example of an HTTP to HTTPS redirection but I'm not sure how to redirect to a different destination port.
Thanks
1 Reply
- mimlo_61970
Cumulonimbus
a basic rule that can be applied to a port 80 virtual server that redirects all traffic from port 80 to port 81 would be
when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1]:81[HTTP::uri] }Basically the built in redirect rule with :81 squeezed between the host and the URI where it belongs.
Result:
Escape character is '^]'. GET /path?query HTTP/1.1 Host: www.abc.com Connection: Close HTTP/1.0 302 Found Location: https://www.abc.com:81/path?query Server: BigIP Connection: close 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