Forum Discussion
4 Replies
Sort By
- nitassEmployee
doesn't normal HTTP::redirect work?
HTTP::redirect
- AnushNimbostratus
Thanks Nitass for your comment. no normal redirect won't work since redirect site hosted on same backend pool member. Yesterday I had successfully implemented.
- when HTTP_REQUEST {
- log local0. "Request: [HTTP::uri]"
- if { [string tolower [HTTP::host]] equals "abc.com" && [HTTP::uri] equals "/default.aspx" } {
- log local0. "sending request to error_aspx"
- HTTP::redirect "https://abc.com/error.aspx"
- } else {
- log local0. "sending request to pool"
- pool abc.com
- }
- What_Lies_Bene1Cirrostratus
Can't you just rewrite the URI? using HTTP:uri?
- What_Lies_Bene1Cirrostratus
Exactly where you want to change the URI is unclear, so this is a guess;
when HTTP_REQUEST { log local0. "Request: [HTTP::uri]" if { [string tolower [HTTP::host]] equals "abc.com" && [HTTP::uri] equals "/default.aspx" } { log local0. "sending request to error_aspx" HTTP::uri "/error.aspx" } else { log local0. "sending request to pool" pool abc.com } }