Forum Discussion
kg_50758
Nimbostratus
Jul 25, 2007Standard HTTPs redirect
I am new to iRules, when i tried the standard https redirect if the url ends with '.do, could not get it to working. iRules i used is as below
when HTTP_REQUEST {
if { [HTTP::uri]...
kg_50758
Nimbostratus
Jul 26, 2007Aaron,
Getting this compilation error while using your iRule code,
when HTTP_REQUEST priority 501 {
set request_info "client: [IP::client_addr] -> ([virtual name] - [IP::local_addr]:[TCP::local_port]) [HTTP::host][HTTP::uri]"
}
when HTTP_RESPONSE priority 501 {
set headers "Headers: " foreach aHeader [HTTP::header names] { set headers "$headers$aHeader: [HTTP::header value $aHeader] " } log local0. "Request Info: $request_info; Response Info: status: [HTTP::status] $headers"
}
01070151:3: Rule [log_request_response] error:
line 5: [wrong args] [set headers "Headers: " foreach aHeader [HTTP::header names] { set headers "$headers$aHeader: [HTTP::header value $aHeader] " } log local0. "Request Info: $request_info; Response Info: status: [HTTP::status] $headers"]
1. Same iRule is not applied to https virtual server. I have 2 virtual server one for http and one for https, service ports are 80 and 443 respectively.
2. Ensured rule is applied only to http virtual server.
3. I understand the complication on uri having jsessionid and parsing, that is the reason i want to get all the request redirected to https without the if statement first.
Thanks
KG
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