comparison modules/apache/templates/vhost/_rewrite.erb @ 0:956e484adc12

Initial public release of Puppet configs
author IBBoard <dev@ibboard.co.uk>
date Sat, 16 Aug 2014 19:47:38 +0000
parents
children 37675581a273
comparison
equal deleted inserted replaced
-1:000000000000 0:956e484adc12
1 <%- if @rewrites -%>
2 ## Rewrite rules
3 RewriteEngine On
4 <%- if @rewrite_base -%>
5 RewriteBase <%= @rewrite_base %>
6 <%- end -%>
7
8 <%- [@rewrites].flatten.compact.each do |rewrite_details| -%>
9 <%- if rewrite_details['comment'] -%>
10 #<%= rewrite_details['comment'] %>
11 <%- end -%>
12 <%- if rewrite_details['rewrite_base'] -%>
13 RewriteBase <%= rewrite_details['rewrite_base'] %>
14 <%- end -%>
15 <%- if rewrite_details['rewrite_cond'] -%>
16 <%- Array(rewrite_details['rewrite_cond']).each do |commands| -%>
17 <%- Array(commands).each do |command| -%>
18 RewriteCond <%= command %>
19 <%- end -%>
20 <%- end -%>
21 <%- end -%>
22 <%- Array(rewrite_details['rewrite_rule']).each do |commands| -%>
23 <%- Array(commands).each do |command| -%>
24 RewriteRule <%= command %>
25 <%- end -%>
26
27 <%- end -%>
28 <%- end -%>
29 <%- end -%>
30 <%# reverse compatibility %>
31 <% if @rewrite_rule and !@rewrites -%>
32 ## Rewrite rules
33 RewriteEngine On
34 <% if @rewrite_base -%>
35 RewriteBase <%= @rewrite_base %>
36 <% end -%>
37 <% if @rewrite_cond -%>
38 <% Array(@rewrite_cond).each do |cond| -%>
39 RewriteCond <%= cond %>
40 <% end -%>
41 <% end -%>
42 RewriteRule <%= @rewrite_rule %>
43 <%- end -%>