CompleteFTP's default home page (below) is displayed when a user first navigates to the server via a web browser.
The text on the home page can be modified or the whole page can be replaced entirely. Both are done by creating a file with a set of customization instructions at the following path:
C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Include\custom\customizations.jss
This file is a JSS (Javascript Server-Side) file. You may modify the text and logo of the existing home page by placing a set of variable assignments in this file, as illustrated below:
publicPageContent.homeURL = "https://mycompany.com"; publicPageContent.logo = "https://mycompany.com/logo.jpg"; publicPageContent.title = "My Company"; publicPageContent.subTitle = ""; publicPageContent.login = "Sign In"; publicPageContent.links = [ { url: "https://mycompany.com/instructions.html", text: "Usage Instructions" }, { url: "https://mycompany.com/privacy.html", text: "Privacy Policy" } ];
Alternatively, you can replace the page entirely by setting the variable, publicPageTemplate
, to the path of an HTML file, as shown in the example below:
publicPageTemplate = "../Include/custom/homePage.html";
This example instructs CompleteFTP to replace the default home page with a file at
C:\ProgramData\Enterprise Distributed Technologies\Complete FTP\Include\custom\homePage.html
The HTML file must be created by you and should include a link to /Login
. Alternatively it could contain Javascript code to redirect the user to the login page automatically, as shown below:
<html> <body> <script type = "text/javascript"> window.location = "/Login"; </script> </body> </html>
Similarly, the login and logout pages may be replaced by setting the loginPageTemplate
and logoutPageTemplate
variables, respectively. Note that these two pages contain a number of critical functional elements (e.g. <form>
and <input>
), as well as macros (in double curly brackets) and Javascript code, so care must be taken when developing alternative templates. A good approach would be to copy the existing template and modify it incrementally, testing carefully after each modification. It's also important to note that future versions of CompleteFTP may rely on modifications to the default templates to support new features, so it will be important to check release notes for advice on such changes, and to confirm that any customized templates work reliably after CompleteFTP updates are installed.
For more information on customizing the home page, please refer to Step-by-step guide: Customize the web home page