20 Lines or Less #75: URIs, URIs and more URIs
What could you do with your code in 20 Lines or Less?
That's the question I like to ask for the DevCentral community, and every time I go looking to find cool new examples that show just how flexi...
Published Jun 17, 2014
Version 1.0Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
Colin_Walker_12
Historic F5 Account
Joined May 12, 2005
Cory_50405
Jun 17, 2014Noctilucent
The original iRule we were working from was this:
when HTTP_REQUEST {
if { ([string match {[A-Z]} [HTTP::uri]] and [[HTTP::path] ends_with ".aspx"])} {
set hostname [string tolower [HTTP::host]]
set uriname [string tolower [HTTP::uri]]
log local0. "Request is $hostname$uriname"
HTTP::redirect "http://$hostname$uriname"
}
}
This one shouldn't encounter redirect loops.