Forum Discussion
Shridhar_84609
Nimbostratus
Aug 24, 2009Redirecting the URI
Hello,
I have a requirement to do the following -
http://abc.com/timesheets
should fetch the data from -
http://server1.com:30945/GroupServer/en/
...
Shridhar_84609
Nimbostratus
Aug 25, 2009Hi Aaron,
Thanks for the reply. I forgot to tell you that access to the root directory browsing has been disabled on these servers.
ie.., If I want to access these servers directly (bypassing the Big-IP) I can only access -
http://server1.com:30945/GroupServer/en/
&
http://server2.com:40702/primaveraweb
and nothing else.
In short, I CANNOT access the data just by typing http://server1.com:30945/ nor http://server2.com:40702/ in the browser. I need to type the full URL to get the content.
I believe the below if statement in your suggested iRule will not work -
if {[HTTP::path] starts_with "/timesheets"}{
log local0. "[IP::client_addr]:[TCP::client_port]: Matched /timesheets check"
pool timesheets_http_pool
because, this would just make the Big-IP try to fetch the data from http://server1.com:30945/ & NOT from http://server1.com:30945/GroupServer/en/.
Also, the same goes with the 'else' statement -
else {
pool default_http_pool
Hope, I am clear in my explanation.
I tried the following iRule (without logging), and I was able to make it only the 'timesheets' part work but NOT the 'primaveraweb' part -
b rule abc_com_rule {'
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/timesheets"} {
HTTP::redirect "http://[HTTP::host]/GroupServer/en" } elseif {[HTTP::uri] starts_with "/GroupServer/en"} {
pool timesheets_http_pool } elseif {[HTTP::uri] eq "/"} {
HTTP::uri "/primaveraweb"} elseif {[HTTP::uri] starts_with "/primaveraweb"} {
pool primaveraweb_http_pool }
}
'}
Am I missing something or is there a better way to accomplish this?
Regards,
Shridhar
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