AnsweredAssumed Answered

How to add URLs in templates based on deployment server

Question asked by mcarson on Aug 2, 2011

I am quite new to this, but I have set up a web project with various web forms (using Freemarker templates to generate the HTML). I also have different deployment servers (acceptance test, development, etc) configured for the web project.

I would like to know if there is a way I can configure in the templates, or otherwise, to have the host name based on the deployment server.

My file is index.html, and deployed to my acceptance test server at http://uat/index.html, and for development it is deployed at http://dev/index.html
Can I use Freemarker, or perhaps the deployment engine to inject in a link for a location on the host, but on port 8081,
  i.e. http://uat:8081/some-other-location/ for the acceptance test server, and
        http://dev:8081/some-other-location/ for the development server

Another example would be that I might want to redirect to https:// on the deployment server.

Thanks in advance.