Forum Discussion
MattC_58842
Nov 29, 2011Nimbostratus
HTTP redirect ?
Today I have a I-rule that has 1 URL redirect , im trying to figure out how to add multiple lines in this i-rule.
when HTTP_REQUEST {
if { [HTTP::host] contains "eprospectusdirect.com"} {
HTTP::redirect "http://dstoutput.com/product/eprospectusdirect"
} else {
pool wdc-docorpws-5000
}
}
Now i want to add more urls and im not sure of the syntax
Want to add these to current I-rule
We'd like: dstmailingservices.com to point to:http://dstoutput.com/product/presort-services
And statementpacks.com to point to: http://dstoutput.com/statementpacks/index.html
- Hi MattC,
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "*eprospectusdirect.com" { HTTP::redirect "http://dstoutput.com/product/eprospectusdirect" } "*dstmailingservices.com" { HTTP::redirect "http://dstoutput.com/product/presort-services" } "*statementpacks.com" { HTTP::redirect "http://dstoutput.com/statementpacks/index.html" } default { pool wdc-docorpws-5000 } } }
- Thanks for the quick response , I will give it a shot.