Forum Discussion
joec_41569
Nimbostratus
Jan 31, 2008redirect https to a specific url
How can I redirct traffic going to https to a specific URL.
For example if a user types in https://site.com, I would like it to redirect to https://site.com/logon
Thanks
...
hoolio
Cirrostratus
Feb 04, 2008Hi Joe,
Depending on which major version of BIG-IP you're running, you could post in the relevant iRules section (Click here 9.x or Click here 4.x).
To send a redirect in 9.x, you can use a rule like this:
when HTTP_REQUEST {
Check if path is /
if {[HTTP::path] eq "/"}{
Send 302 redirect to the new location
HTTP::redirect https://[HTTP::host]/logon
}
}
To do this in 4.x, you can use a rule like this:
if (http_uri == "/") {
redirect to "https://" + http_host + "/logon"
}
Aaron
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