Forum Discussion
irule 302 redirect
Need to create an irule for 302 redirection - I have to redirect care1.com to newcare1.com. Created the following I rule
when HTTP_REQUEST {
if { [HTTP::https://care1.com/] equals "/" } {
HTTP::redirect "https://newcare1.com/ucmuser/"
}
}
I am receiving this error while submitting. ---- (01070151:3: Rule [/Common/care1-test] error: /Common/care1-test:2: error: [undefined procedure: HTTP::https://care1.com/][HTTP::https://care1.fhlmc.com/])
Please guide.
- Kevin_StewartEmployee
when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { HTTP::redirect "https://newcare1.com/ucmuser/" } }
- khansafdarali1_Nimbostratus
Do I need to create a HTTP profile? As I am getting a error message "01070394:3: HTTP_REQUEST event in rule (/Common/care1-test) requires an associated HTTP or FASTHTTP profile on the virtual server (/Common/care1-443)." if yes? what setting do I need to configure the profile with?
- Kevin_StewartEmployee
Yes, at a minimum you need an HTTP profile assigned to the VIP to be able to use HTTP events and commands in an iRule. For this iRule you can simply use the default http profile.
- khansafdarali1_Nimbostratus
After creating the I rule and VIP. when I go care1.com and it keeps on loading on the browser. Redirection is not going to newcare1.com
- Kevin_StewartEmployee
Are care1.com and newcare1.com on the same VIP? Or separate VIPs?
Are you attempting to access https://care1.com/? Or some other URI?
Do you have access to a client side capture tool like HTTPWatch or Fiddler? If so, look at the requests and responses and tell us what you see.
- khansafdarali1_Nimbostratus
newcare1.com is a webserver.
care1.com is a vip
I am attempting to access https://care1.com/
In fiddle I am seeing
Result 200 Protocol - HTTP URL care1.com Detail message - This is a Tunnel. Status: OPEN, Raw Bytes Out: 188; In: 0 Result 200 Protocol - HTTP URL BIGIPhostame:443 This is a Tunnel. Status: CLOSED, Raw Bytes Out: 1,221; In: 2,032 After this I am seeing series of
Result 200 Protocol - HTTP URL BIGIPhostame:443 This is a Tunnel. Status: CLOSED, Raw Bytes Out: 1,221; In: 2,032
Result 200 Protocol - HTTP URL BIGIPhostame:443 This is a Tunnel. Status: CLOSED, Raw Bytes Out: 1,221; In: 2,032
Below is the error message I am receiving at the end (on IE)
"This page can’t be displayed Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://selfcare1.fhlmc.com again. If this error persists, it is possible that this site uses an unsupported protocol or cipher suite such as RC4 (link for the details), which is not considered secure. Please contact your site administrator."
- Kevin_StewartEmployee
Do you have a client SSL profile applied to the care1.com VIP?
Where is "https://selfcare1.fhlmc.com" coming from?
- Kevin_StewartEmployee
You cannot use HTTP iRules events and command on an SSL VIP unless you have an HTTP profile, and are actively decrypting the SSL at the VIP. Think of it terms of the OSI model. You can't see the HTTP traffic at layer 7, if you're not decrypting it at layer 6.
In other words, if you don't have a client SSL profile applied to the care1.com VIP, you cannot use HTTP iRules events and commands.
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