Forum Discussion
Dixit_18200
Nimbostratus
Feb 23, 2010Help needed for irule issue
Hi,
I have setup two irules for http to https redirection
1st for redirecting the below websites
http://www.acbg.com/ucc
http://www.acbg.com/saleshu...
Hamish
Cirrocumulus
Feb 23, 2010Is there anything else in the iRules? Or are they just a single event? Two iRules shoould both fire, one after tjhe other, unless the first has a discard, drop or event statement...
Can you put a logline in the start of the event to indicate whether they're being called, and what the URI is
(Oh. I'd probably re-write the iRules to do a lookup in a class rather than a whole lot of if/then/elseif's... It'll scale better. e.g. (I was going to write one, but the findclass wiki page has it as an example already)
class URIredirects {
"/dir1/dir2/dir3/ http://somehost.somewhere.com/redirect_target.html"
"/dir4/dir5/dir6/ http://someotherhost.nowhere.com/redirect_target.html"
}
when HTTP_REQUEST {
set location [findclass [HTTP::uri] $::URIredirects " "]
if { $location ne "" }
HTTP::redirect $location
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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