dlogsdonmd
Jan 09, 2017Nimbostratus
iRule URL/URI redirect question
Hello, we're implementing Jira in our environment and we want to redirect users and agents to different URIs. I'm trying to implement a rule to do the below:
If user enters: http://support.domain.org/customers LB redirects to: https://support.domain.org/servicedesk/customer/portals
If user enters: http://support.domain.org/agents LB redirects to: https://support.domain.org/secure/Dashboard.jspa
My attempt at this is below, but I'm getting errors.
when HTTP_REQUEST {
if { [HTTP::host] equals "support.domain.org" and [HTTP::uri] starts with "/customer"} {
HTTP::redirect "https://support.domain.org/servicedesk/customer/portals"
}
}
elseif { [HTTP::host] equals "support.domain.org" and [HTTP::uri] starts with "/agents"} {
HTTP::redirect "https://support.domain.org/secure/Dashboard.jspa"
}
}
else {
HTTP::respond 404 content "Unrecognized request to [HTTP::uri]" "Content-Type" "text/html"
}
}
Any assistance would be appreciated.
Thanks.