Forum Discussion
hatim1
Aug 24, 2011Nimbostratus
mapping an external FQDN name to an Internal FQDN one
Hi all,
I am trying to map an external FQDN name to an internal FQDN (not known externally) using an irule. Due to this fact I am changing the host name in the irule and sending the request directly
to a pool (contains the internal IP address for the internal FQDN). If the internal FQDN was known externally I could have used http redirect and it would have worked.
Here is what I am looking to accomplish:
https://external.domain.com --> http://internal.domain.com/landing.htm
In my case, It works partially. I am not able to display images because F5 tries always to use the public FQDN (according to Fiddler).
Here is what I am doing:
when RULE_INIT {
set static::internal_host "internal.domain.com"
set static::external_host "external.domain.com"
set static::uri_page "/landing.htm"
set static::uri_home "/"
}
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] contains $static::external_host } {
HTTP::header replace Host [string map [list $static::external_host $static::internal_host] [HTTP::host]]
HTTP::header replace location [string map [list https:// http://] [HTTP::header value Location]]
HTTP::uri [string map [list $static::uri_home $static::uri_page] [HTTP::uri]]
pool internal_landing_page_pool
log local0. "[IP::client_addr] requested [HTTP::header value Host] [HTTP::host] [HTTP::uri]"
}
}
Can anybody let me know what am I missing?
Thanks a lot,
Hatim
- hooleylistCirrostratusHi Hatim,
- hatim1NimbostratusThanks Aaron. I will review the links and let you know.
- hatim1Nimbostratus
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects