no way to compare when less than two revisions

差異處

這裏顯示兩個版本的差異處。


a10:slb:aflex:http:error-redirect [2014/04/24 15:53] (目前版本) – 建立 jal
行 1: 行 1:
 +====== Redirect to Somewhere when Response 4xx or 5xx ======
 +  * When server response 4xx or 5xx, then redirect(aka:302) to somewhere.
  
 +===== Requirement =====
 +  * Service Type: HTTP / HTTPS
 +
 +===== Code =====
 +<code tcl>
 +when HTTP_RESPONSE {
 +  if { [HTTP::status] starts_with "2" || [HTTP::status] starts_with "3"} {
 +    # Just fast pass that to decrease process
 +  } elseif { [HTTP::status] contains "404"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  } elseif { [HTTP::status] contains "403"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  } elseif { [HTTP::status] contains "402"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  } elseif { [HTTP::status] contains "400"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  } elseif { [HTTP::status] contains "500"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  } elseif { [HTTP::status] contains "501"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  } elseif { [HTTP::status] contains "503"} {
 +    HTTP::redirect "http://www.au.edu.tw"
 +  }
 +}
 +</code>
a10/slb/aflex/http/error-redirect.txt · 上一次變更: 2014/04/24 15:53 由 jal
上一頁 | 下一頁 | 回首頁 | RSS Feed | Facebook