Forum Discussion

chris__sisler_1's avatar
chris__sisler_1
Icon for Nimbostratus rankNimbostratus
Oct 04, 2005

irule that routes to multiple domain names

I can't seem to get the syntax right for this rule, so I thought I would bother the forum for a nice concise answer, hopefully! I want to have an irule that splits 1 VIP into multiple domain names. I have been working on the following rule:

 

 

when HTTP_REQUEST {

 

if { [HTTP::host] eq "www.domain1.com" } {

 

pool domain1 }

 

elseif { [HTTP::host] eq "www.domain2.com" } {

 

pool domain2 }

 

}

 

 

Thanks in advance for anyone's help regarding this inquiry!

 

 

Regards,

 

Chris S.
  • i think you have a space after the end of

     

     

    elseif { [HTTP::host] eq "www.domain2.com" } {

     

     

    remove that space and it should work better..
  • For a slight variation check out this thread:

     

     

    Click here http://devcentral.f5.com/Default.aspx?tabid=28&forumid=5&postid=3143&view=topic

     

     

    -Brian