Forum Discussion
Yann_Desmarest_
Nacreous
Hello,
The switch condition are taken in the order, so you can define a /dir1* but after /dir1/dir2* for example.
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] {
"/dir1/dir2*" {
HTTP::respond 301 Location "http://www.domain2.com"
}
"/dir1*" {
HTTP::respond 301 Location "http://www.domain1.com"
}
}
}
Yann_Desmarest_
Mar 29, 2016Nacreous
What is the logic behind your redirect links ?
Maybe, you can extract patterns from your request uri and change the Location value accordingly with a string map command