Forum Discussion
CraigyB_172365
Nimbostratus
Jan 12, 2018HOST and partial path rewrite
Hi I am new to F5 and am trying to do a URL rewrite a chunk of the URL. I think I am on the right track but I just cannot make it work. Any help is really appreciated.
I just want to replace any...
kolom_265617
Cirrostratus
Jan 12, 2018Hello CraigyB, Try using the following iRule.
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] starts_with "/info" ) } {
set uri [HTTP::uri [string map {"/info" "/files"} [HTTP::uri]]]
HTTP::redirect "https://[HTTP::host]$uri"
}
}
CraigyB_172365
Nimbostratus
Jan 12, 2018Hi Kolom, appreciate your input, which parts do i replace with destination host name and port number?
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