Forum Discussion
Bertolazzi_7869
Apr 18, 2012Nimbostratus
HTTP Redirect: Hint or an example?
Hi everyone
!
Sorry for
my bad
English.
See if you
can help me, I'm a newbie in F5 and iRules and I search the following:
Redirect
requests ...
Michael_Yates
Apr 18, 2012Nimbostratus
Hi Bertolazzi,
Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/abc" } {
HTTP::redirect [string map {"abc" "def"} [HTTP::uri]]
}
}
This iRule some assume that you just want to replace the sub-directory "abc" with "def" and keep the rest of the HTTP::uri.
If you are needing something else just let us know.
Hope this helps.
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