Forum Discussion
Ravi_110217
Nimbostratus
May 02, 2008page redirection
Hello,
I wanted to redirect following webpage...
Redirect from
www.xyz.com.au to https://www.xyz.com.au
If you know IRULE , please let me know...
Thanks.
hoolio
Cirrostratus
May 02, 2008Here is a codeshare example for 9.x:
HTTP To HTTPS Redirect 302
http://devcentral.f5.com/wiki/default.aspx/iRules/HTTPToHTTPSRedirect_302.html
For 9.x, you can use a rule like this to redirect all requests to the VIP to https:
when HTTP_REQUEST {
Check if Host header value has a length
if {[string length [HTTP::host]]}{
Redirect to the requested host and URI (minus the port if specified)
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
} else {
Redirect to VIP's IP address
HTTP::redirect https://[IP::local_addr][HTTP::uri]
}
}For 4.x, you can check your post in that forum (Click here).
Also, please post a single question in the appropriate forum. Posting the same question across multiple forums means you're likely to get the same answer from multiple people. And as nmenant pointed out, this question has been asked and answered fairly often. You'd find several working examples from a quick search of the relevant 4.x or 9.x forum.
Thanks,
Aaron
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