Forum Discussion
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
- IheartF5_45022Nacreous
You just need to change the first 'if' with
If {[HTTP::host] eq "www.domain.com" && [HTTP::path] eq "/foosite}{
- victor_FondevilNimbostratus
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
- victor_FondevilNimbostratus
Well... It seems some weird Chrome issue, I just tried on Internet Explorer and it works...
- IheartF5_45022Nacreous
Make sure you have oneconnect enabled as your rule will only work intermittently without it.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com