我有一个负载平衡器F5 Big IP为我的网站。 目前,我有302redirect到位; 然而,我想申请301,但不知道如何。
例如:
我的网站(abc.com)input302redirect到abc.com/index,inputwww.abc.com 302redirectwww.abc.com/index。 我想有一个能帮助我的规则
以下是我的技术人员正在尝试的代码:
redirect到WWW
when HTTP_REQUEST { if { [HTTP::host] equals "abc.com" or [HTTP::host] equals "abc.co.in" or [HTTP::host] equals "www.abc.co.in" } { if {!( [HTTP::path] equals "/")} { HTTP::respond 301 Location "http://www.abc.com[HTTP::path]" } } }
redirectPOST
when HTTP_REQUEST { if { [HTTP::method] equals "POST" } { persist source_addr pool shop_shop_vr4_http } }
redirect-VR4主页
when HTTP_REQUEST { if { [HTTP::path] equals "/" or [HTTP::path] starts_with "/target/" or [HTTP::path] starts_with "/logs/" or [HTTP::path] starts_with "/config/" } { HTTP::redirect "http://[HTTP::host]/index.jsp.vr" } }