Forum Discussion
lisiecki_54902
Nimbostratus
Sep 08, 2017redirect all uri to a subdirectory on a different site
I want to redirect all uri to a subdirectory on a different site
when HTTP_REQUEST {
if {[string tolower[HTTP::uri]] starts_with "/")} {
HTTP::redirect "http://www.example.com/some_directory/[HTTP::uri]"
}
}
- Stanislas_Piro2
Cumulonimbus
Hi,
All URI start with /. The condition will match all requests.
Don't convert URI to lowercase if there is no alphabetical character in the compared string.
You can try this
when HTTP_REQUEST { HTTP::redirect "http://www.example.com/some_directory/[HTTP::uri]" }
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