Forum Discussion

victor_Fondevil's avatar
victor_Fondevil
Icon for Nimbostratus rankNimbostratus
Feb 26, 2014

present http page without rewriting client headers

Hi, I'm fairly new on F5 Loadbalancers so excuse me if the question is dumb.

I'm trying to make an iRule that reads Host header searching for www.domain.com/foosite and if it matches, send to another pool (LAMP_Server) which have a wordpress listening on notification.domain.com and present the HTML page notification.domain.com/foosite without changing client's navigator URL (www.domain.com/foosite)

The only way I could do it was rewriting Host header so changing the client navigator URL.

    when HTTP_REQUEST {
        log local0. "Request: [HTTP::host]"
            if { [HTTP::uri] contains "foosite" } {
                HTTP::header replace Host notifications.domain.com
                pool LAMP_Server
            }
    }

    when HTTP_RESPONSE {
    log local0. "Response:"
    foreach aHeader [HTTP::header names] {
          log local0. "$aHeader: [HTTP::header value $aHeader]"
       }
    }

Do you can help me??

Greets

4 Replies

  • You just need to change the first 'if' with

    If {[HTTP::host] eq "www.domain.com" && [HTTP::path] eq "/foosite}{       
    
  • I think the question it's misunderstood (probably my fault, english isn't my first language)... I need the F5 to return the page notifications.domain.com/foosite under the www.domain.com/foosite URL, without rewriting client URL

     

  • Well... It seems some weird Chrome issue, I just tried on Internet Explorer and it works...

     

  • Make sure you have oneconnect enabled as your rule will only work intermittently without it.