summaryrefslogtreecommitdiff
path: root/templates/site.erb
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-12-05 18:21:44 -0200
committerSilvio Rhatto <rhatto@riseup.net>2011-12-05 18:21:44 -0200
commitf78584ac4599e7a019e53f35ce3592006a6a612c (patch)
treead8fd01c68ef0df1ae50e2bf1dcbcb10254a5687 /templates/site.erb
parent53db8dbfe147b8fccd1907457d5668af6971a0d5 (diff)
downloadpuppet-apache-f78584ac4599e7a019e53f35ce3592006a6a612c.tar.gz
puppet-apache-f78584ac4599e7a019e53f35ce3592006a6a612c.tar.bz2
Adding https_redirect parameter
Diffstat (limited to 'templates/site.erb')
-rw-r--r--templates/site.erb3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/site.erb b/templates/site.erb
index be92907..f02dbe0 100644
--- a/templates/site.erb
+++ b/templates/site.erb
@@ -3,6 +3,9 @@
ServerName <%= title %>.<%= hosting_domain %>
<% if server_alias != false %> ServerAlias <%= server_alias %><% end %>
DocumentRoot <%= docroot %>
+ <% if https_redirect != false %>
+ RewriteEngine On
+ RewriteRule (.*) https://<%= title %>.<%= hosting_domain %>$1<% end %>
<% if redirect_match != false %> RedirectMatch ^/$ <%= protocol %>://<%= title %>.<%= hosting_domain %>/<%= redirect_match %><% end %>
<% if redirect != false %> Redirect <%= redirect %><% end %>
<% if aliases != false %><% aliases.each do |map| -%>