exceptions to redirects

can anyone help with this..

its not working

my code

class noSSL {

myutil

util_forum

}

when HTTP_REQUEST {

if { [matchclass [HTTP::uri] ends_with $::noSSL] } {

HTTP::redirect http://[HTTP:host][HTTP:uri]

}

}

error:

01070151:3: Rule [nsaonline.ch-non-https] error:

line 1: [undefined procedure: class] [class noSSL {

myutil

util_forum

}]

line 8: [undefined procedure: HTTP:host] [HTTP:host]

line 8: [undefined procedure: HTTP:uri] [HTTP:uri]

Are you trying to define the class within the iRule itself? I don’t think that works. I’m pretty sure you have to declare the class separately (as a datagroup). Try that.

where would i do that?

ahhh!.. found the datagroups

ok so i defined my datagroup,

and i still get :

01070151:3: Rule [nsaonline.ch-nonssl] error:

line 3: [undefined procedure: HTTP:host] [HTTP:host]

line 3: [undefined procedure: HTTP:uri] [HTTP:uri]

Try putting the URL in quotes:

when HTTP_REQUEST { 
   if { [matchclass [HTTP::uri] ends_with $::noSSL] } { 
     HTTP::redirect "http://[HTTP:host][HTTP:uri]" 
   } 
 }

I’m not sure if it’s required (I forget the exact TCL rules about this stuff), but it’s the only thing I see that might be wrong.

same thing..

when HTTP_REQUEST {

if { [matchclass [HTTP::uri] ends_with $::nonSSL-nsaonline.ch] } {

HTTP::redirect “http://[HTTP::host][HTTP:uri]”

}

}

01070151:3: Rule [nsaonline.ch-nonssl] error:

line 3: [undefined procedure: HTTP:uri] [HTTP:uri]

still getting this error

01070151:3: Rule [nsaonline.ch-nonssl] error:

line 3: [undefined procedure: HTTP:uri] [HTTP:uri]

I think I see it. You only have 1 ‘:’ where you need 2.

when HTTP_REQUEST {  
   if { [matchclass [HTTP::uri] ends_with $::noSSL] } {  
     HTTP::redirect "http://[HTTP::host][HTTP::uri]"  
   }  
 }

SWEET that was it.. THANKS!!!

cant believe i didnt see that.

ok.. so ive come to this

http profile:

when HTTP_REQUEST {

if { [HTTP::uri] ends_with “myjuiceplus” || [HTTP::uri] ends_with “juiceplus_forum” } {

HTTP::redirect http://[HTTP::host][HTTP::uri]

}

else {

HTTP::redirect https://[HTTP::host][HTTP::uri]

}

}

ssl profile:

when HTTP_REQUEST {

if { [HTTP::uri] ends_with “myjuiceplus” || [HTTP::uri] ends_with “juiceplus_forum” } {

HTTP::redirect http://[HTTP::host][HTTP::uri]

}

}

and it kinda works.. when i hit the ssl page and navigate to the page that ends with myjuiceplus or juiceplus_forum, it forwards to http

but the page says

The page isn’t redirecting properly

any ideas??

got it..

needed to take out the

HTTP::redirect http://[HTTP::host][HTTP::uri]

on the nonssl irule.