Forum Discussion
NorCalAdam_6796
Nimbostratus
May 22, 2014Change part of URI, http port and pool
I am trying to migrate from a version of solr to a multicore version and I need to change the URI and port that comes in. I am wondering how the code below looks: This needs to be changed: http:/...
Kevin_Stewart
Employee
May 22, 2014Something like this maybe:
when HTTP_REQUEST {
if { ( [HTTP::uri] starts_with "/solr" ) and not ( [HTTP::uri] contains "/core1" ) } {
set uri [string map {"/solr" "/solr/core1"} [HTTP::uri]]
HTTP::redirect "http://[HTTP::host]$uri"
} else {
HTTP::header replace Host "[HTTP::header Host]:8080"
}
}
The pool should be assigned to the virtual server, so you don't need to set it in the iRule.
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