Forum Discussion

Ralph_Bonnell_1's avatar
Ralph_Bonnell_1
Icon for Nimbostratus rankNimbostratus
Sep 26, 2005

Rewriting http header with virtual hosts

Hello,

 

 

We are trying to figure out an iRule that will make the load balancer send the fqdn host name (www.example.com) in the request back to the server. Requests that come in to this vip can have 6 different urls, all of which reside on the same web server and on the same ip address. The web server will send back the correct page only when the specific host in the url is requested.

 

 

Any assistance on the writing of this iRule?

 

 

--

 

-Ralph Bonnell

 

4 Replies

  • See the following thread for an example of what you are looking. Click here

     

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

     

     

    Post back to that thread if you have any questions.

     

     

    -Brian
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Ralph,

     

     

    I'm not sure I understand the problem you're encountering. The fully qualified domain name should always be contained in the request to the server as a part of the HTTP HOST header.

     

     

    So long as you have your web server configured to serve pages for all of the domains in question, there shouldn't be an issue. The BIG-IP will simply forward the packet on to the web server, domain name and all.

     

     

    If you're trying to rewrite the URL in some way, that's something that can certainly be handled by iRules, but we'll need a little further information.

     

     

    Thanks!

     

     

    -Colin
  • Ok, thanks. We most likely have a network issue then. I had an impression the http headers were modified.