Forum Discussion
Jeff_Bull_42197
Nimbostratus
Oct 09, 2012Need help with redirect iRule
I've setup two virtual server's, one intended for our mobile site (https://mobile.site.com), and another that uses the same IP for HTTP to HTTPS redirects (http://mobile.site.com). As of now, the HTT...
nitass
Employee
Oct 10, 2012this is irule.
e.g.
[root@ve10:Active] config b virtual bar80 list
virtual bar80 {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b virtual bar443 list
virtual bar443 {
snat automap
pool foo
destination 172.28.19.79:443
ip protocol 6
rules myrule
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::uri] equals "/"} {
HTTP::redirect https://[HTTP::host]/User/MobileSiteStart/List
}
}
}
[root@ve10:Active] config curl -I http://172.28.19.79
HTTP/1.0 302 Found
Location: https://172.28.19.79/User/MobileSiteStart/List
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve10:Active] config curl -Ik https://172.28.19.79
HTTP/1.0 302 Found
Location: https://172.28.19.79/User/MobileSiteStart/List
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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
