Jump to content
Sign in to follow this  
rev.dennis

Where can I find help for iRules

Recommended Posts

Need help creating a redirect iRule.  Any suggestions on where to locate information on how to create such an iRule

Share this post


Link to post
Share on other sites

A great reference is found on the F5 site, check out Chapter 02

https://thezah.com/forums/topic/7490-where-can-i-find-help-for-irules/

Here is an example of a redirect from http to https

when HTTP_REQUEST {
 HTTP::respond 301 Location https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}

 

Here is an example of a redirected website

when HTTP_REQUEST { 
if { [string tolower [HTTP::host]] equals "www.thezah.com" } { 
HTTP::respond 301 Location "https://sales.thezah.com" 
}
 }

 

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...