Forum Discussion
Identical websites accessed with different URL's
Hi, my current (test) irule pasted below. The uri is being re-written because the application team want a test environment which can be 'cloned' straight to prod after testing new releases etc, yet wanting the site accessible using the /test url. Does that make sense? The below would work perfectly for me if they had the test and training in /test and /training on the server (without a uri rewrtie).
when HTTP_REQUEST { log local0. "irule Test_5 HIT" if {[string tolower [HTTP::uri]] starts_with "/training" } { HTTP::uri [string map -nocase {"/training" "/"} [HTTP::uri]] pool Training_Pool log local0. "Training Pool selected match on training" } elseif {[string tolower [HTTP::uri]] starts_with "/test" } { HTTP::uri [string map -nocase {"/test" "/"} [HTTP::uri]] pool TEST_POOL log local0. "TEST_POOL selected matched on test" } else { pool Prod_Pool log local0. "Else statement matched and sent to Prod_Pool" } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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