Forum Discussion
Rosieodonell_16
Cirrus
Jun 01, 2015Need help with quick redirect irule
I am trying to get the redirect for the outlook iapp to work a little better. Here is the redirect:
when HTTP_REQUEST {
if { ([HTTP::uri] == "/") } {
HTTP::redirect https:...
nitass
Employee
Jun 01, 2015so basically i want it to look for "/" or "owa" and redirect it to only https://webmail.company.com/owa/. ignoring all other bits of uri.
is the logic (redirect / or /owa/something to /owa/) indeed correct? i think it may cause an issue in accessing application. anyway, this is an example.
configuration
[root@ve11a:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/owa/" {
Do nothing
}
"/" -
"/owa/*" {
HTTP::redirect "https://[HTTP::host]/owa/"
}
default {
Do nothing
}
}
}
}
test
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/
HTTP/1.0 302 Found
Location: https://172.28.24.10/owa/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/owa/something
HTTP/1.0 302 Found
Location: https://172.28.24.10/owa/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve11a:Active:In Sync] config curl -I http://172.28.24.10/owa/
HTTP/1.1 404 Not Found
Date: Tue, 02 Jun 2015 04:12:26 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sun, 09 Feb 2014 08:39:51 GMT
ETag: "41879c-59-2a9c23c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
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