Forum Discussion

Ravi_110217's avatar
Ravi_110217
Icon for Nimbostratus rankNimbostratus
May 21, 2008

URL to redirect onto one of the web server

Hello,

 

 

I am really looking for great help here. I need to workout for following redirection as I have never work out for this sort of redirection....

 

 

I need to redirect http://www.abcd.com.au to one of the web server on port 80. Web server IP address is 10.x.x.x and node is already created in the F5.

 

 

I dont know that how to write rule for this request and where to apply this rule.

 

 

Your quick help will be much more appreciated...

 

 

Thanks,
  • 192.168.1.1 is the virtual IP address. Typically, when configuring load balancing you have one new IP address configured on the external VLAN. Clients make requests to this IP address. www.abcd.com.au would need to resolve in DNS to this external IP address (or perhaps to a firewall address which is NAT'd to this virtual IP address on the BIG-IP). The BIG-IP answers the client request and load balance it to one of the pool members.

     

     

    Devcentral wasn't really designed to provide this level of instruction though. The LTM configuration guide describes basic load balancing configurations. If you get stuck with that, you could contact F5 and ask them to send you an engineer to go through the basic configuration of the unit. They'd charge you for this, but it would be a good learning opportunity for you. They also offer basic and advanced training courses.

     

     

    Aaron
  • Hi,

     

    I have got problem with URL to divert on to one of the web server. The public IP is already been used by website like : www.abc.com and my client has created new link like www.bml.abc.com.au which has same IP address.

     

    Whenever someone request for web URL www.abc.com it comes to firewall and it does NAT and virtual IP address will redirect request on to web server.

     

     

    One more thing to inform you that we have got 4 web server and they are running different web applications.

     

     

    My main question is that if my above mentioned URLs user same public and virtual IP addresses then how would I redirect specifically onto different web server.

     

     

    my webserver IP is : 10.254.x.x

     

    Virtual IP: 10.254.248.x

     

    public IP: 59.x.x.x

     

     

    how would I write irule to redirect URL onto specific web server....

     

     

    Your quick help will be much more appreciated..

     

     

    Thanks,
  • Here is an example.

     

     

     
     when HTTP_REQUEST {   
         if {[HTTP::uri] contains "black"} {     
                node 10.254.x.x 80 
            } 
     } 
     

     

     

    Have you also tried searching for the code on this site? There are plenty examples here that you can extrapolate.

     

     

     

    CB

     

  • HI,

     

     

    thanks very much for IRULE example... Would you pls give me answer for my following question?

     

     

     

    I have got problem with URL to divert on to one of the web server. The public IP is already been used by website like : www.abc.com and my client has created new link like www.bml.abc.com.au which has same IP address.

     

    Whenever someone request for web URL www.abc.com it comes to firewall and it does NAT and virtual IP address will redirect request on to web server.

     

     

    One more thing to inform you that we have got 4 web server and they are running different web applications.

     

     

    My main question is that if my above mentioned URLs user same public and virtual IP addresses then how would I redirect specifically onto different web server.

     

     

    my webserver IP is : 10.254.x.x

     

    Virtual IP: 10.254.248.x

     

    public IP: 59.x.x.x

     

     

    Can I redirect two different URL with same PUBLIC IP address to 2 different internal web server with round robin method...
  • Yes you can. All you have to do is simply have to create 2 seperate pools that contains 2 different internal web servers configured for round robin and then use the iRule example to direct one URL to one pool and other URL to another pool. If you need example please search for them as they are plenty of examples.

     

     

  • I've checked few forum replies but couldn't find out irule. If you could pls guide me through.. I'm sorry but could not find so asking again...

     

     

    Thanks,
  • when HTTP_REQUEST { 
       switch -glob [string tolower [HTTP::uri]] { 
         "/uri1/*" { 
           pool pool_1 
         } 
         "/uri2/*" { 
           pool pool_2 
         } 
       } 
     }

    -Joe
  • Click here for an example

     

    Click here for the Wiki which is where I advise you to look look before searching the forums.

     

    Click here for a helpful Tutorial on writing TK/TCL code which is the basis of iRule. It helped me understand programming, atleast with TK/TCL.