| | |
| | | // 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( |