update ssl tempalte to handle redirects