Forum Discussion
adrian_171483
Cirrus
Oct 06, 2016Irule to "prepend" directory and retain URI
Hi. i have a requirement for the following:
type somesite.com/anything/anything
then we need to add /something into the URI without a redirect and retain the original client URI reques...
- Nov 04, 2016
when HTTP_REQUEST { HTTP::header replace Host "[HTTP::host]:38080" log local0. "Sending request to server" Log the original path if debug is enabled if {$::uri_mapping_debug}{log local0. "Original path: [HTTP::host][HTTP::uri]"} If the path doesn't already start with the base URI and version, insert it if {[string tolower [HTTP::path]] starts_with "/api/"}{ HTTP::path "/imr-ce-web[HTTP::path]" Log the modified path if debug is enabled if {$::uri_mapping_debug}{log local0. "Modified path: path: [HTTP::host][HTTP::uri]"} } }
adrian_171483
Cirrus
Nov 04, 2016when HTTP_REQUEST {
HTTP::header replace Host "[HTTP::host]:38080"
log local0. "Sending request to server"
Log the original path if debug is enabled
if {$::uri_mapping_debug}{log local0. "Original path: [HTTP::host][HTTP::uri]"}
If the path doesn't already start with the base URI and version, insert it
if {[string tolower [HTTP::path]] starts_with "/api/"}{
HTTP::path "/imr-ce-web[HTTP::path]"
Log the modified path if debug is enabled
if {$::uri_mapping_debug}{log local0. "Modified path: path: [HTTP::host][HTTP::uri]"}
}
}
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
