From aad18738f37bf2eb573b12f2a18a96c518c7c06e Mon Sep 17 00:00:00 2001
From: Michael Hierweck <michael.hierweck@hostsharing.net>
Date: Wed, 15 Aug 2012 12:54:47 +0200
Subject: [PATCH] Das Template unterst├╝tzt die Deaktivierung des Fallbacks auf htdocs(-ssl) nicht nicht als Verzeichnis angelegte Subdomains unter subs(-ssl).

---
 hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
index d1e2a97..8db34fc 100644
--- a/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
+++ b/hsarback/src/de/hsadmin/mods/dom/httpd-vhost-static.jtpl
@@ -26,11 +26,16 @@
 
     RewriteEngine On
     RewriteOptions Inherit
+    
     RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
     RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} -d
     RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1}$1 [last]
 
-</VirtualHost>
+<!-- BEGIN: nosubdomainfallbackforhttp -->    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:80)?$ [novary]
+    RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d
+    RewriteRule ^(.*) - [redirect=404,last]
+
+<!-- END: nosubdomainfallbackforhttp --></VirtualHost>
 
 <VirtualHost {DOM_IPNUMBER}:443 {DOM_IPNUMBEREX}:443>
 
@@ -67,9 +72,14 @@
     
     RewriteEngine On
     RewriteOptions Inherit
+    
     RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
     RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} -d
     RewriteRule ^(.*) /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1}$1 [last]
 
-</VirtualHost>
+<!-- BEGIN: nosubdomainfallbackforhttps -->    RewriteCond %{HTTP_HOST} ^(.+)\.{DOM_HOSTNAME}\.?(:443)?$ [novary]
+    RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d
+    RewriteRule ^(.*) - [redirect=404,last]
+    
+<!-- END: nosubdomainfallbackforhttps --></VirtualHost>
 <!-- END: main -->
\ No newline at end of file

--
Gitblit v1.9.0-SNAPSHOT