From: Silvio Rhatto Date: Mon, 5 Dec 2011 20:24:37 +0000 (-0200) Subject: Better RewriteRule X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=03a5f804a20b98ccea8598aa7893c914c7fa1ee6;p=puppet-apache.git Better RewriteRule --- diff --git a/templates/site.erb b/templates/site.erb index f02dbe0..25dd22d 100644 --- a/templates/site.erb +++ b/templates/site.erb @@ -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| -%>