]> gitweb.fluxo.info Git - puppet-apache.git/commitdiff
Better RewriteRule
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 5 Dec 2011 20:24:37 +0000 (18:24 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 5 Dec 2011 20:24:37 +0000 (18:24 -0200)
templates/site.erb

index f02dbe0b4a04a2c474720e66aa1474b14d6b3637..25dd22d7da2b2efb981a0a842bdfe00c0f2b3255 100644 (file)
@@ -5,7 +5,7 @@
    DocumentRoot <%= docroot %>
  <% if https_redirect != false %>
     RewriteEngine On
-    RewriteRule (.*) https://<%= title %>.<%= hosting_domain %>$1<% end %>
+    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
 <% 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| -%>