Forum Discussion
iRule to add ".org" to host and redirect to HTTPS
If you have a look in the default redirect iRule on the F5 system ( _sys_https_redirect), you can see a nice example of how it roughly could look. If you then add your statement for filtering the correct domain name, as well as the .org-bit, it would look something like this:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "example" } {
HTTP::redirect https://[getfield [HTTP::host] ":" 1].org[HTTP::uri]
}
}
You can remove the HTTP::uri and/or HTTP::host in the redirect and replace with the hardcoded domain name if you want, or you can use this format to keep it more flexible for other uses.
Hope this helps.
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