Forum Discussion
hooleylist
Feb 16, 2012Cirrostratus
Here's another option using a switch statement:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/abc*" -
"/def*" {
HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]"
}
}
}
I'm assuming you want starts_with like matching so I put a wildcard on the end of the directories. If you want contains like matching, you could put an asterisk at the beginning of the directories as well.
Aaron