Forum Discussion
Massimo_Ruscian
Nimbostratus
Jun 11, 2018iRule to redirect keeping part of URL
Hi,
I need to do a redirect keeping part of URL.
HOST: customer.it
URI:
/* --> /abc/* => customer.it/* becomes customer.it/abc/*
/abc/* --> /abc/* => customer.it/abc/* remains customer.it/abc...
youssef1
Cumulonimbus
Jun 11, 2018Hi,
tried this:
when HTTP_REQUEST {
set path [HTTP::path]
if { !([HTTP::path] starts_with "/abc/" || [HTTP::path] starts_with "/xyz/") } {
set combinedpath "/abc$path"
HTTP::redirect "$combinedpath"
}
}
Keep me update.
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