<% if @redirect_source and @redirect_dest -%>
<% @redirect_dest_a   = Array(@redirect_dest) -%>
<% @redirect_source_a = Array(@redirect_source) -%>
<% @redirect_status_a = Array(@redirect_status) -%>

  ## Redirect rules
<% @redirect_source_a.each_with_index do |source, i| -%>
<% @redirect_dest_a[i] ||= @redirect_dest_a[0] -%>
<% @redirect_status_a[i] ||= @redirect_status_a[0] -%>
  Redirect <%= "#{@redirect_status_a[i]} " %><%= source %> <%= @redirect_dest_a[i] %>
<% end -%>
<% end -%>
