Forum Discussion
Gregt_33960
Nimbostratus
May 13, 2008Masking or Redirect?
Hello,
I am hoping some one can help me. I multiple application environments running (test, train, dev, etc..) on a group of web servers. To get to each environment, the client browser needs to use the full URL, listed below.
http://www.domain.com/test/jsp/common/pgLogin.jsp
http://www.domain.com/training/jsp/common/pgLogin.jsp
http://www.domain.com/dev/jsp/common/pgLogin.jsp
I have created the necessary pool definitions on the F5. I have an IRule in place on my F5 that URI filters based on the environment name (test, training, dev) and sends to appropriate pool successfully. However, I am trying to add logic to my IRule that does not require the client to have to use the Fully Qualified URL.
When a user types: http://www.domain.com/test/ --> we get page not found. How do I modify my Irule so this would work? Not sure if redirect or masking? I do not believe I want redirect, because that forces the client to initiate a new session. Is more forwarding?
Here is my current IRule syntax:
when HTTP_REQUEST {
log local0. "Current URI: [HTTP::uri]"
if {[HTTP::uri] starts_with "/test" }{
pool state_test_pool
} elseif {[HTTP::uri] starts_with "/dev"}{
pool state_dev_pool
} elseif {[HTTP::uri] starts_with "/train"}{
pool state_train_pool
}
}
Any insight would be extremely helpful.
Thanks
Greg
- The_Bhattman
Nimbostratus
Hi Greg,when HTTP_REQUEST { log local0. "Current URI: [HTTP::uri]" switch [HTTP::uri] { "/test" { HTTP::uri "/test/jsp/common/pgLogin.jsp" pool state_test_pool } "/dev" { HTTP::uri "/dev/jsp/common/pgLogin.jsp" pool state_dev_pool } "/train" { HTTP::uri "/train/jsp/common/pgLogin.jsp" pool state_train_pool } } }
- Gregt_33960
Nimbostratus
CB, - The_Bhattman
Nimbostratus
Hi Greg, - Nicolas_Menant
Employee
Hi,when HTTP_REQUEST { log local0. "Current URI: [HTTP::uri]" if {[HTTP::uri] starts_with "/test" } { if {[HTTP::uri] ends_with "/test" } { HTTP::uri "/test/jsp/common/pgLogin.jsp" } pool state_test_pool } elseif {[HTTP::uri] starts_with "/dev"} { if {[HTTP::uri] ends_with "/dev" } { HTTP::uri "/dev/jsp/common/pgLogin.jsp" } pool state_dev_pool } elseif {[HTTP::uri] starts_with "/train"} { if {[HTTP::uri] ends_with "/train" } { HTTP::uri "/train/jsp/common/pgLogin.jsp" } pool state_train_pool } }
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