Forum Discussion
Boris_11323
Nimbostratus
Jan 25, 2018Redirect by last directory as parameter.
Hi,
I need to redirect from [dynamic directory name] to [dynamic directory name]
Thanks for help.
youssef1
Cumulonimbus
Jan 25, 2018Hello Thiyagu,
So, You can try with following Irule:
when HTTP_REQUEST {
set uri [HTTP::uri]
if { $uri starts_with "/a/"}{
set rangeuri [string range [HTTP::uri] 3 end]
set redirecturi "/b/go?p=$rangeuri"
HTTP::redirect "$redirecturi"
log local0. "redirect to $redirecturi from $uri"
}
}
Regards,
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