Vince_Beltz_959
Jul 31, 2009Nimbostratus
Findstr in Redirect?
Seems like this should be very simple. If a certain value is in the HTTP::host, I need to search the URI for a string and do a redirect with the found string on the end of the redirected URI. If the HTTP::host value isn't there, the rule falls through to a standard redirect. Is there a way to simply do the findstr within the redirect, something like this:
when HTTP_REQUEST {
If {[HTTP::host] ends_with "sub.domain.com" } {
HTTP::redirect http://target.com/domain=([findstr] [HTTP::uri] "q=" 2 "&")
else
HTTP::redirect http://target.com/domain=[HTTP::host]
}