Forum Discussion
Below is the code that is working perfectly for one of the sites, however for some reason it won't work when I apply it to another site that has about 8 lines of matches, any thoughts?
when HTTP_REQUEST { switch -glob [string tolower [HTTP::path]] { "/clocks.asp" - "/includes/" - "/favicon.ico" - "/images/" { pool www-distribution_pool } default { HTTP::respond 301 location "http://www.mysite.com/Distribution.aspx" } } }
Here is the longer match code that does not seem to work (it just redirects everything no matter what I do):
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::path]] { "/news/" - "/favicon/" - "/links/" - "/downloads/" - "/offices/" - "/programs/" - "/selling/" - "/wear/" - "/links/" - "/images/" { pool www-landing_pool } default { HTTP::respond 301 location "http://www.myothersite.com/landing.aspx" } } }
Lastly, would it be better to use a datagroup for a longer list like that? I tried to do so but could not get that to work either. As before, ANY help appreciated!