vhost templates from michael

This commit is contained in:
Peter Hormanns 2012-10-30 10:46:25 +01:00
parent a7a0263ed3
commit b92369eea8

View File

@ -325,21 +325,21 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
// TODO: This code should be cleaned up after switching to the velocity template engine.
query.setParameter("option", "htdocsfallback");
if (query.getResultList().isEmpty()) {
templateVars.put("HTDOCSFALLBACKHTTP",
templateVars.put("NOHTDOCSFALLBACKHTTP",
" RewriteCond %{REQUEST_URI} !^/cgi-bin/\n" +
" RewriteCond %{REQUEST_URI} !^/fastcgi-bin/\n" +
" RewriteCond %{HTTP_HOST} ^(.+)\\.{DOM_HOSTNAME}\\.?(:80)?$ [novary]\n" +
" RewriteCond /home/doms/{DOM_HOSTNAME}/subs/${tolower:%1} !-d\n" +
" RewriteRule ^(.*) - [redirect=404,last]");
templateVars.put("HTDOCSFALLBACKHTTPS",
" RewriteRule ^(.*) - [redirect=404,last]\n");
templateVars.put("NOHTDOCSFALLBACKHTTPS",
" RewriteCond %{REQUEST_URI} !^/cgi-bin/\n" +
" RewriteCond %{REQUEST_URI} !^/fastcgi-bin/\n" +
" RewriteCond %{HTTP_HOST} ^(.+)\\.{DOM_HOSTNAME}\\.?(:443)?$ [novary]\n" +
" RewriteCond /home/doms/{DOM_HOSTNAME}/subs-ssl/${tolower:%1} !-d\n" +
" RewriteRule ^(.*) - [redirect=404,last]");
" RewriteRule ^(.*) - [redirect=404,last]\n");
} else {
templateVars.put("HTDOCSFALLBACKHTTP", "\n");
templateVars.put("HTDOCSFALLBACKHTTPS", "\n");
templateVars.put("NOHTDOCSFALLBACKHTTP", "\n");
templateVars.put("NOHTDOCSFALLBACKHTTPS", "\n");
}
Processor domSetupProcessor = new CompoundProcessor(