Forum Discussion
HTTP to HTTPS redirection and URL redirection for the same VS
We have a requirement to redirect any http traffic to https, and in the same VS, to redirect the traffic that comes for http://abc.com/* to https://xyz.com/test.htm
Shall this be combined in the same iRule or we have to create 2 different iRules, also appreciate if we can get help on the iRule
2 Replies
- Lidev
Nacreous
Using iRule is not the best way to do this, it's better to use the native features of F5 BIG-IP and create LTM Policies.
Reference :
- RaghavendraSY
Altostratus
Please try below one:
when HTTP_REQUEST {
if {[HTTP::host] equals "rpm.com "}
{
HTTP::respond 301 "Location" "https://rpm.com[HTTP::uri]"
}
if { [HTTP::host] equals "abc.com" } {
HTTP::redirect "https://xyz.com/test.htm"
}
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