Forum Discussion
C_D_18583
Nimbostratus
Nov 20, 2006Replacing in the URI ; http -> https and port 80 -> 443
What is the easiest way to rewrite the following string? Replacing in the URI http -> https and port 80 -> 443
Before:
https://testlab-d.tdx.dorion.com/amserver/UI/Login?go...
Steve_Manuel_11
Nimbostratus
Nov 27, 2006Hi Aaron;
The latest.
The iRule I tested with is
big ip rule
RULE NAME: D3_INT1_SECURE_REDIRECT_NEW
VERSION : 1.0
when HTTP_REQUEST {
if {[HTTP::uri] contains "goto" and [HTTP::uri] contains "eperformance"} {
HTTP::uri [string map {goto=http% goto=https% %3A80% %3A443%} [HTTP::uri]]
log local0. "The cached uri is [HTTP::uri]"
pool D2_INT1_IDENTITY
}
elseif { [HTTP::uri] starts_with "/eperformance/" } {
persist source_addr 1800
pool D3_INT1_EMPLOYEE_8
}
elseif { [HTTP::uri] starts_with "/amserver/" } {
persist source_addr 1860
pool D2_INT1_IDENTITY
}
elseif { [HTTP::uri] starts_with "/amconsole/" } {
persist source_addr 1860
pool D2_INT1_IDENTITY
}
}
Verified back end node (D2_INT1_IDENTITY) is getting the correct URI
172.23.106.13 - - [27/Nov/2006:08:58:10 -0500] "GET
/amserver/UI/Login?goto=https%3A%2F%2Fsecureinternal-d.tmi.telus.com%3A443%2Feperformance%2FLogin.do%3FLANGUAGE%3DEN
HTTP/1.1" 200 7773
However problem is client browser still passing incorrect uri. Do I need to change my rule logic to redirect the new HTTP::uri instead of doing the string substitution then forwarding traffic to the D2_INT1_IDENTITY pool
Onward I go
Steve
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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