F5 Üzerinde SEO Uyumlu Maintenance Page (Bakımda Sayfası) IRULE
Sistemini yönettiğiniz siteler f5 load balancer arkasında ise kullanıcıya bakımda sayfası gösterilmesi gerektiği durumlarda f5 üzerinden bakımda sayfası serve edilebilir.
Bakımda sayfası için basit html sayfalar kullanılabilir. Kullandığınız bakımda sayfasının içeriğine göre aşağıda paylaşacağım irule farklılıklar gösterebilir.
Sayfa ile ilgili tüm dosyaları aşağıda belirttiğim şekilde import edebilirsiniz.
Aşağıdaki irule ile ilgili Virtual Server’da tanımlı web.pool altında bulunan node’lardan tümü offline olduğu durumda yani kullanılacak bir node kalmadığı durumda ilgili sitede ifile olarak tanımladığımız html sayfa f5 tarafından serve edilecek.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
when HTTP_REQUEST { if { [active_members web.pool] < 1 } { set maint_prefix "/bakimda" set maint_prefix2 "/images/slider.png" set maint_prefix3 "/images/logo.png" set maint_prefix4 "/images/wrapper.png" set maint_prefix5 "/images/citys.png" set maint_prefix6 "/images/background.png" if { [HTTP::uri] equals "$maint_prefix" } { HTTP::respond 503 content [ifile get dating_bakimda.html] "Content-Type" "text/html" "Connection" "Close" return } if { [HTTP::uri] equals "$maint_prefix2" } { HTTP::respond 200 content [ifile get dating_slider.png] "Content-Type" "image/png" "Connection" "Close" return } if { [HTTP::uri] equals "$maint_prefix3" } { HTTP::respond 200 content [ifile get dating_logo.png] "Content-Type" "image/png" "Connection" "Close" return } if { [HTTP::uri] equals "$maint_prefix4" } { HTTP::respond 200 content [ifile get dating_wrapper.png] "Content-Type" "image/png" "Connection" "Close" return } if { [HTTP::uri] equals "$maint_prefix5" } { HTTP::respond 200 content [ifile get dating_citys.png] "Content-Type" "image/png" "Connection" "Close" return } if { [HTTP::uri] equals "$maint_prefix6" } { HTTP::respond 200 content [ifile get dating_background.png] "Content-Type" "image/png" "Connection" "Close" return } HTTP::redirect $maint_prefix } else { set my_uri [string tolower [HTTP::uri]] if { $my_uri starts_with "/bakimda" } { HTTP::redirect https://[HTTP::host] } } } |
So, what do you think ?