Https redirect with exceptions not working
Hi Guys, I was hoping someone might be able to help me. I'm trying to put an irule in that redirects all urls to https from http bar some exceptions. I've currently got the below rule (bottom) which seems to work fine with the lines like this
} elseif { ( [HTTP::uri] contains "/admin" ) } {
pool pool1-http
where it looks for something after the domain. When I've tried to put something in to look for something in the domain it doesn't appear to be working as it's still redirecting to https. So, lines like this
if { ( [HTTP::host] starts_with "admin" ) } {
pool pool1-http
I can only seem to get the irule exceptions working anything after the domain. Has anyone got any ideas on this one. Any help would be much appreciated
Here is the full rule I've currently got.
when HTTP_REQUEST {
if { ( [HTTP::host] starts_with "admin" ) } {
pool pool1-http
} elseif { ( [HTTP::uri] contains "/admin" ) } {
pool pool1-http
} elseif { ( [HTTP::uri] contains "/schedule" ) } {
pool pool1-http
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}}
Cheers
Chris
If I go to the site it redirects to https.
may the redirect be done by server?
have you ever used http analyzer tool? it may be helpful.
HttpFox