Forum Discussion
chungyu_16122
Altostratus
Mar 28, 2012iRule redirects for HTTP::uri
Hi all
I wrote a irule for some simple HTTP redirect but found that a single / inserted by the user was casue the rule to break.
For example user tries to reach french.school.ca...
wlopez
Cirrocumulus
Mar 28, 2012Have you tried replacing the "equals" operator with "starts_with"?
when HTTP_REQUEST {
if { [HTTP::host] equals "francais.mcgill.ca" and [HTTP::uri] starts_with "/students" } {
HTTP::redirect "http://www.mcgill.ca/fr/students"
}
}
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