<% if @rewrite_rule -%>

  ## Rewrite rules
  RewriteEngine On
<% if @rewrite_base -%>
  RewriteBase <%= @rewrite_base %>
<% end -%>
<% if @rewrite_cond -%>
<% Array(@rewrite_cond).each do |cond| -%>
  RewriteCond <%= cond %>
<% end -%>
<% end -%>
  RewriteRule <%= @rewrite_rule %>
<% end -%>
