Forum Discussion
LyonsG_85618
Cirrostratus
Jul 31, 2013HTTP::header replace problem
Hi folks.
I have a simple iRule to replace a host & uri
when HTTP_REQUEST {
set requestedHost [string tolower [HTTP::host]]
set requestedURI [HTTP::uri]
...
LyonsG_85618
Cirrostratus
Aug 09, 2013Although iRule is now working fine on both HTTP and HTTP virtual servers I have found a slight issue.
When i stay on the same VIP the irule works fine
Example:
1) If uri is http://www.test1.com and irule is set to replace host to www.test2.com and change uri to /index.html - i get re-written and sent to correct page but browser still has http://www.test1.com - This is good and is working as designed
2) if i try the same as 1) but replace protocol with https and change uri to /secure (i have another irule that picks up that /secure should be https and forces all traffic to HTTPS virtual server) this works as expected e.g. requested uri is https://www.test1.com/secure - gets re-written to https://www.test2.com/secure and browser retains https://www.test1.com/secure
However....
3) If i enter http://www.test1.com/secure - i get redirected to https://www.test2.com/secure and browser shows this in address bar.
I am guessing it is something to do with the other irules i have - but just wondered whether anyone had seen something like this previously?
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