Forum Discussion
External to internal Redirect broken
Hi!
Hoping someone could point me in the right direction for a problem I am trying to solve. I've gone through the forums and I can't quite find the right answer (or if it is I don't understand it).
Use case: User browses to an external facing webpage (An F5 VIP) https://external.company.com/dev
The F5 offloads the SSL traffic and passes the user through to an internal website: http://internal.company.com:40000/longstring
The issue I have is when I do a redirect with an iRule on my VS it is sending the end user to the internal resource (Which can't be resolved externally).
The iRule that redirects the user to an internal website that they can't access:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "external.company.com" } {
switch -glob [string tolower [HTTP::uri]] {
"/dev" {
HTTP::redirect "http://internal.company.com:40000/longstring"
}
}
}
}
Any idea how to proxy the user to an internal website when outside the company?
- JG
Cumulonimbus
Create a server pool internal_pool with ip_address_of_internal.company.com:40000 as the pool member and then use the following irule:
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "external.company.com" } { switch -glob [string tolower [HTTP::uri]] { "/dev" { pool internal_pool } } } }
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