Advertisement
Guest User

Untitled

a guest
May 13th, 2016
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.01 KB | None | 0 0
  1. when HTTP_REQUEST {
  2. switch -glob [string tolower [HTTP::host]] {
  3. "www.*" {
  4. HTTP::redirect "http://[HTTP::host][HTTP::uri]"
  5. }
  6. {[a-z.]*} {
  7. HTTP::redirect "http://www.[HTTP::host][HTTP::uri]"
  8. }
  9. "" {
  10. HTTP::redirect "http://[IP::local_addr][HTTP::uri]"
  11. }
  12. default {
  13. HTTP::redirect "http://[HTTP::host][HTTP::uri]"
  14. }
  15. }
  16. }
  17.  
  18.  
  19. when HTTP_REQUEST priority 502 {
  20.  
  21. set host [string tolower [HTTP::host]]
  22. set path [string tolower [HTTP::path]]
  23. set redirect ""
  24. set aes_host "enterprisesolutions.accuweather.com"
  25.  
  26. #Redirect non-www hosts to www at root
  27. if { [class match -- $host equals gateway_redirect_hosts] } {
  28. HTTP::respond 301 Location "http://www.accuweather.com/"
  29. }
  30. elseif { ( $host equals "www.accuweather.com" ) || ( $host equals "wwwa.accuweather.com" ) || ( $host equals "accuweather.com" ) } {
  31. if { [class match -- [string tolower [HTTP::path]] equals gateway_redirect_exact_match] } {
  32. HTTP::respond 301 Location "http://www.accuweather.com/"
  33. }
  34. else {
  35. switch -glob [string tolower [HTTP::path]] {
  36. "/adcbin/local_index/*" -
  37. "/wabc/*" -
  38. "/kidz/*" -
  39. "/adcbin/desktop2/*" -
  40. "/adcbin/desk_travel/*" {
  41. HTTP::respond 301 Location "http://www.accuweather.com/"
  42. }
  43. "/enterprisesolutions" {
  44. HTTP::respond 301 Location "http://${aes_host}/"
  45. }
  46. "/tv/storyteller/" {
  47. HTTP::respond 301 Location "http://storyteller.accuweather.com/"
  48. }
  49. "/storyteller*" {
  50. HTTP::respond 301 Location "http://storyteller.accuweather.com/"
  51. }
  52. "/events" {
  53. HTTP::respond 301 Location "http://willitsnow.com/"
  54. }
  55. "/en/weather-video-wall*" {
  56. HTTP::respond 301 Location "http://videowall.accuweather.com/"
  57. }
  58. "/en/downloads*" {
  59. HTTP::respond 301 Location "http://downloads.accuweather.com/"
  60. }
  61. "/adc2004/pub/products_services/*" {
  62. if { [class match $path equals forensics_redirect] } {
  63. set redirect [class match -value -- $path equals forensics_redirect]
  64. HTTP::respond 301 Location "http://${aes_host}${redirect}"
  65. }
  66. }
  67. "/twitter/" {
  68. HTTP::respond 301 Location "http://www.accuweather.com/en/social"
  69. }
  70. "/careers*" {
  71. #HTTP::respond 301 Location "https://accuweathercareers.silkroad.com/"
  72. HTTP::respond 301 Location "https://careers.accuweather.com/"
  73. }
  74. }
  75. }
  76. }
  77. elseif { ( $host equals "global-warming.accuweather.com" ) } {
  78. HTTP::respond 301 Location "http://www.accuweather.com/global-warming.asp"
  79. }
  80. elseif { ( $host equals "story-teller.net" ) || ( $host equals "www.story-teller.net" ) } {
  81. HTTP::respond 301 Location "http://storyteller.accuweather.com/"
  82. }
  83. elseif { ( $host equals "accuweatherchannel.com" ) || ( $host equals "www.accuweatherchannel.com" ) || ( $host equals "accuweatherlive.com" ) || ( $host equals "www.accuweatherlive.com" ) || ( $host equals "accuweatherlive.tv" ) || ( $host equals "www.accuweatherlive.tv" ) || ( $host equals "accuweathernetwork.com" ) || ( $host equals "www.accuweathernetwork.com" ) || ( $host equals "accuweathernetwork.tv" ) || ( $host equals "www.accuweathernetwork.tv" ) || ( $host equals "theaccuweatherchannel.com" ) || ( $host equals "www.theaccuweatherchannel.com" ) || ( $host equals "theaccuweatherchannel.info" ) || ( $host equals "www.theaccuweatherchannel.info" ) || ( $host equals "theaccuweatherchannel.net" ) || ( $host equals "www.theaccuweatherchannel.net" ) || ( $host equals "theaccuweatherchannel.org" ) || ( $host equals "www.theaccuweatherchannel.org" ) || ( $host equals "theaccuweatherchannel.tv" ) || ( $host equals "www.theaccuweatherchannel.tv" ) || ( $host equals "tvwarning.com" ) || ( $host equals "www.tvwarning.com" ) } {
  84. HTTP::respond 301 Location "http://www.getaccuweather.tv/"
  85. }
  86. elseif { ( $host equals "www.weathermatrix.net" ) || ( $host equals "weathermatrix.accuweather.com" ) } {
  87. HTTP::respond 301 Location "http://www.accuweather.com/en/weather-blogs/weathermatrix"
  88. }
  89. elseif { ( $host equals "www.accutraffic.com" ) || ($host equals "accutraffic.com" ) || ($host equals "accu-traffic.com" ) || ($host equals "www.accu-traffic.com" ) } {
  90. HTTP::respond 301 Location "http://www.accuweather.com/www/accutraffic/index.html"
  91. }
  92. elseif { ( $host equals "www.stormreports.com" ) || ($host equals "stormreports.com" ) || ($host equals "weatheradvisory.com" ) || ($host equals "www.weatheradvisory.com" ) || ($host equals "willitsnow.com" ) || ($host equals "www.willitsnow.com" ) } {
  93. HTTP::respond 301 Location "http://www.accuweather.com/en/us/severe-weather"
  94. }
  95. elseif { ( $host equals "www.accuweatherdeveloper.com" ) || ($host equals "accuweatherdeveloper.com" ) } {
  96. HTTP::respond 301 Location "http://apidev.accuweather.com/developers/"
  97. }
  98. elseif { ( $host equals "www.accuweatherservices.com" ) || ($host equals "accuweatherservices.com" ) } {
  99. HTTP::respond 301 Location "http://www.accuweather.com/adc2004/pub/products_services/index.asp?partner=accuweather"
  100. }
  101. elseif { ( $host equals "www.accuweathercanada.com" ) || ($host equals "accuweathercanada.com" ) } {
  102. HTTP::respond 301 Location "http://www.accuweather.com/en/ca/canada-weather"
  103. }
  104. elseif { ( $host equals "www.accuweather.de.com" ) || ($host equals "accuweather.de.com" ) } {
  105. HTTP::respond 301 Location "http://www.accuweather.com/en/de/germany-weather"
  106. }
  107. elseif { ( $host equals "www.accuweather.eu.com" ) || ($host equals "accuweather.eu.com" ) } {
  108. HTTP::respond 301 Location "http://www.accuweather.com/en/fr/europe/2608434/weather-forecast/2608434"
  109. }
  110. elseif { ( $host equals "www.accuweather.hu.com" ) || ($host equals "accuweather.hu.com" ) || ( $host equals "www.accuweather.tel" ) || ($host equals "accuweather.tel" ) || ( $host equals "www.accuweatherinternational.com" ) || ($host equals "accuweatherinternational.com" ) || ( $host equals "www.accuweatherworld.com" ) || ($host equals "accuweatherworld.com" ) } {
  111. HTTP::respond 301 Location "http://www.accuweather.com/en/world-weather"
  112. }
  113. elseif { ( $host equals "www.accuweather.jp" ) || ($host equals "accuweather.jp" ) } {
  114. HTTP::respond 301 Location "http://www.accuweather.com/en/jp/japan-weather"
  115. }
  116. elseif { ( $host equals "www.accuweather.no.com" ) || ($host equals "accuweather.no.com" ) } {
  117. HTTP::respond 301 Location "http://www.accuweather.com/en/no/norway-weather"
  118. }
  119. elseif { ( $host equals "www.accuweather.qc.com" ) || ($host equals "accuweather.qc.com" ) } {
  120. HTTP::respond 301 Location "http://www.accuweather.com/en/ca/quebec/g1r/weather-forecast/50011"
  121. }
  122. elseif { ( $host equals "www.accuweather.ru.com" ) || ($host equals "accuweather.ru.com" ) } {
  123. HTTP::respond 301 Location "http://www.accuweather.com/en/ru/russia-weather"
  124. }
  125. elseif { ( $host equals "www.accuweather.se.com" ) || ($host equals "accuweather.se.com" )|| ($host equals "accuweather.se.net" )|| ($host equals "www.accuweather.se.net" ) } {
  126. HTTP::respond 301 Location "http://www.accuweather.com/en/se/sweden-weather"
  127. }
  128. elseif { ( $host equals "www.accuweather.tel" ) || ($host equals "accuweather.tel" ) } {
  129. HTTP::respond 301 Location "http://www.accuweather.com/en/world-weather"
  130. }
  131. elseif { ( $host equals "www.accuweather.gb.com" ) || ($host equals "accuweather.gb.com" ) || ($host equals "accuweather.gb.net" ) || ($host equals "www.accuweather.gb.net" ) || ($host equals "www.accuweather.uk.net" ) || ($host equals "accuweather.uk.net" ) } {
  132. HTTP::respond 301 Location "http://www.accuweather.com/en/gb/united-kingdom-weather"
  133. }
  134. elseif { ( $host equals "www.accuweather.za.com" ) || ($host equals "accuweather.za.com" ) } {
  135. HTTP::respond 301 Location "http://www.accuweather.com/en/za/south-africa-weather"
  136. }
  137. elseif { ( $host equals "accuweatherdata.com" ) || ($host equals "www.accuweatherdata.com" ) || ($host equals "accuweatherenterprisesolutions.com" ) || ($host equals "www.accuweatherenterprisesolutions.com" ) || ($host equals "accuweatherenterprisesolutions.net" ) || ($host equals "www.accuweatherenterprisesolutions.net" ) || ($host equals "d3analytics.net" ) || ($host equals "www.d3analytics.net") || ($host equals "weatherdata.com" ) || ($host equals "www.weatherdata.com" ) || ($host equals "weatherdata.mobi" ) || ($host equals "www.weatherdata.mobi" ) || ($host equals "weatherdata.tv" ) || ($host equals "www.weatherdata.tv" ) } {
  138. HTTP::respond 301 Location "http://enterprisesolutions.accuweather.com/"
  139. }
  140. elseif { ($host equals "skyguard.us" ) || ($host equals "www.skyguard.us" ) } {
  141. HTTP::respond 301 Location "http://enterprisesolutions.accuweather.com/skyguard"
  142. }
  143. elseif { ($host equals "stormhawk.mobi" ) || ($host equals "www.stormhawk.mobi" ) || ($host equals "stormhawk.com" ) || ($host equals "www.stormhawk.com" ) } {
  144. HTTP::respond 301 Location "http://enterprisesolutions.accuweather.com/products"
  145. }
  146. elseif { ( $host equals "www.getaccuweather.tv" ) } {
  147. HTTP::respond 301 Location "http://getaccuweather.tv"
  148. }
  149. elseif { ( $host equals "skymo.co" ) || ( $host equals "www.skymo.co" ) || ( $host equals "skymotion.co" ) || ( $host equals "www.skymotion.co" ) || ( $host equals "skymotion.mobi" ) || ( $host equals "www.skymotion.mobi" ) || ( $host equals "skymotion.us" ) || ( $host equals "www.skymotion.us" ) || ( $host equals "skymotionresearch.com" ) || ( $host equals "www.skymotionresearch.com" ) || ( $host equals "skymotionresearch.mobi" ) || ( $host equals "www.skymotionresearch.mobi" ) || ( $host equals "skymotiontest.com" ) || ( $host equals "www.skymotiontest.com" ) } {
  150. HTTP::respond 301 Location "http://skymotion.com"
  151. }
  152. elseif { ( $host equals "www.accuweatheralert.com" ) || ($host equals "accuweatheralert.com" ) || ($host equals "alertaccuweather.com" ) || ($host equals "www.alertaccuweather.com" ) || ($host equals "weatheralerts.org" ) || ($host equals "www.weatheralerts.org" ) } {
  153. HTTP::respond 301 Location "http://alert.accuweather.com/accualert"
  154. }
  155. elseif { ( $host equals "locationcentric.com" ) || ( $host equals "www.locationcentric.com" ) || ( $host equals "www.locatorcentric.net" ) || ( $host equals "locatorcentric.net" ) || ( $host equals "www.locatorcentric.org" ) || ( $host equals "locatorcentric.org" ) || ( $host equals "www.locatorip.com" ) || ( $host equals "locatorip.com" ) || ( $host equals "www.locator-ip.com" ) || ( $host equals "locator-ip.com" ) || ( $host equals "www.usercentric-ip.com" ) || ( $host equals "usercentric-ip.com" ) || ( $host equals "www.user-centricip.com" ) || ( $host equals "user-centricip.com" ) } {
  156. HTTP::respond 301 Location "http://locatorcentric.com"
  157. }
  158. elseif { ( $host equals "accumall.biz" ) || ($host equals "www.accumall.biz" ) || ($host equals "accumall.net" ) || ($host equals "www.accumall.net" ) || ($host equals "accumall.org" ) || ($host equals "www.accumall.org" ) } {
  159. HTTP::respond 301 Location "http://accuweatherstore.com/"
  160. }
  161.  
  162.  
  163. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement