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
Hello 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,
- Stanislas_Piro2
Cumulonimbus
Hi,
you can try this code.
when HTTP_REQUEST { if {[scan [HTTP::uri] "/a/%s" dirname] == 1} { HTTP::redirect "http://www.site2.com/b/go?p=[URI::encode $dirname]" } }
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