Forum Discussion
NielsH_187296
Nimbostratus
Feb 15, 2015Rewriting HOST+URI does not work
Hi,
I'm using the following iRule to let the BigIP redirect a request for /webfront to website-webfront.domain.com. The redirecting should go via the BigIP, not via the client.
Source: http...
StephanManthey
Nacreous
Feb 16, 2015Hi, I just tested this one:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/webfront" } {
set subd [getfield [HTTP::host] ".domain.com" 1]
log local0. "subd: <$subd>"
if { $subd contains "-dmz" } {
set subd [string map {"-dmz" ""} $subd]
}
HTTP::header replace Host "${subd}-webfront.domain.com"
HTTP::uri [string map {"/webfront" ""} [HTTP::uri]]
}
}
Thanks, Stephan
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