Forum Discussion
jedi755_42158
Apr 05, 2012Nimbostratus
iRule redirect OWA and https
Hello, I am trying to write an iRule which redirects traffic to /owa and to https.
User---> http://webmail.mycompany.com
iRule---> https://webmail.mycompany.com/owa
Here is what I have so far:
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
HTTP::redirect "https://webmail.mycompany.com/owa"
}
}
- hooleylistCirrostratusHi,
when HTTP_REQUEST { if { [HTTP::path] equals "/" } { HTTP::redirect "https://webmail.mycompany.com/owa" } else { HTTP::redirect "https://webmail.mycompany.com[HTTP::uri]" } }
- jedi755_42158NimbostratusThanks, so this is only a 443 VS. Would I need to fire up an 80 VS to setup this redirect?
- nitassEmployeethe irule should be on HTTP (not HTTPS) virtual server since user request (http://webmail.mycompany.com) is coming to port 80.
- nitassEmployeee.g.
[root@ve1023:Active] config b virtual bar list virtual bar { destination 172.28.19.79:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve1023:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if { [HTTP::path] equals "/" } { HTTP::redirect "https://webmail.mycompany.com/owa" } else { HTTP::redirect "https://webmail.mycompany.com[HTTP::uri]" } } } [root@ve1023:Active] config curl -I http://webmail.mycompany.com HTTP/1.0 302 Found Location: https://webmail.mycompany.com/owa Server: BigIP Connection: Keep-Alive Content-Length: 0 [root@ve1023:Active] config curl -I http://webmail.mycompany.com/somethingelse HTTP/1.0 302 Found Location: https://webmail.mycompany.com/somethingelse Server: BigIP Connection: Keep-Alive Content-Length: 0
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