Forum Discussion
slackwaresuppor
Nimbostratus
Jun 09, 2008exceptions 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]
- Andy_Herrman_22
Nimbostratus
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. - slackwaresuppor
Nimbostratus
where would i do that? - slackwaresuppor
Nimbostratus
ahhh!.. found the datagroups - slackwaresuppor
Nimbostratus
ok so i defined my datagroup, - Andy_Herrman_22
Nimbostratus
Try putting the URL in quotes:when HTTP_REQUEST { if { [matchclass [HTTP::uri] ends_with $::noSSL] } { HTTP::redirect "http://[HTTP:host][HTTP:uri]" } }
- slackwaresuppor
Nimbostratus
same thing.. - slackwaresuppor
Nimbostratus
still getting this error - Andy_Herrman_22
Nimbostratus
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]" } }
- slackwaresuppor
Nimbostratus
SWEET that was it.. THANKS!!! - slackwaresuppor
Nimbostratus
ok.. so ive come to this
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