chungyu_16122
Mar 28, 2012Altostratus
iRule 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/students and I redirect to http:://www.school.ca/fr/student.
But if the user tries french.school.ca/students/ then the irule would not work.
when HTTP_REQUEST {
if { [HTTP::host] equals "francais.mcgill.ca" and [HTTP::uri] equals "/students" } {
HTTP::redirect "http://www.mcgill.ca/fr/students"
}
}
I tried the equals "/students/ as well, but that did not work.
Can anyone shed some light on the syntax I could use.
thanks
Chung