Forums / General / Detect if url has https. / Comment34790
Karl Latiss
Saturday 03 March 2007 5:54:09 pm
I went another way and used the wrapper operator (http://ez.no/community/contribs/template_plugins/wrapper_operator) with a small user function getServerVariable.php:
<?php function getServerVariable($variable) { return $_SERVER[$variable]; } ?>
Then in my template have
{def $https=wrap_user_func('getServerVariable', array('HTTPS'))}
and check with
{if eq($https, 'on')}
Atvert Systems http://www.atvert.com.au