Forum Discussion
How do I perform a URL redirect on my traffic using F5 server?
I am setting up my very first F5 reverse proxy server and my first goal is to successfully redirect traffic from abc.mydomain.com to https://abc.mydomain.com.
I followed along with this YouTube tutorial, but the GUI was a bit different (an older version?).
In C:\Windows\System32\drivers\etc\hosts, I put in [my.server.ip.here abc.mydomain.com].
I suspect my rule isn't configured correctly. There may be other configuration issues as well.
3 Replies
- IheartF5_45022
Nacreous
Try 'TCP port is 80' instead of 'ClientSSL protocol is abc.mydomain.com'.
- Alex_Bloor_3061
Nimbostratus
Unfortunately, that didn't work. My destination address on the virtual server is using service port 443 (https), so I tried that port as well, but haven't had any success.
- Charles_Lamb
Nimbostratus
Good afternoon,
You need to configure two virtual servers.
1 for http port 80 and 1 for https port 443
The virtual server on port 80 will need an iRule that will do a redirect to 443 using a 301/302. Something along these lines:
when HTTP_REQUEST {
HTTP::respond 301 Location "https://[getfield [HTTP::host] : 1][HTTP::uri]"
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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