HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-10-02 5c452385b93437d0ac5641b1bbee97ab2b712886
default redirect to https
2 files modified
12 ■■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 6 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/htaccess.vm 6 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -250,16 +250,16 @@
                    "chown " + userName + ":" + pacName +  " " + domainDir + "/" + subDir
                ));
        }
        templateVars.put("protocol", "http");
        templateVars.put("www", Boolean.FALSE);
        domDirsProcessor.appendProcessor(
                new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/htdocs/.htaccess", userName, pacName, "644", false)
            );
        templateVars.put("protocol", "https");
        templateVars.put("www", Boolean.TRUE);
        domDirsProcessor.appendProcessor(
                new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/htdocs-ssl/.htaccess", userName, pacName, "644", false)
            );
        domDirsProcessor.appendProcessor(
                new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs/www/index.html", userName, pacName, "644", false)
                new CreateFileProcessor("/de/hsadmin/mods/dom/htaccess.vm", templateVars, dom, domainDir + "/subs/www/.htaccess", userName, pacName, "644", false)
            );
        domDirsProcessor.appendProcessor(
                new CreateFileProcessor("/de/hsadmin/mods/dom/index.html.vm", templateVars, dom, domainDir + "/subs-ssl/www/index.html", userName, pacName, "644", false)
hsarback/src/de/hsadmin/mods/dom/htaccess.vm
@@ -1 +1,5 @@
Redirect permanent / ${protocol}://www.${dom.name}/
#if( ${www} )
    Redirect permanent / https://www.${dom.name}/
#else
    Redirect permanent / https://${dom.name}/
#end