Forums / General / ez_templates: how can i detect the used protocol

ez_templates: how can i detect the used protocol

Author Message

cloud stone

Friday 28 January 2011 4:26:14 am

i have to differentiate if a request called http or https protocol .

http://www.myurl.com/requested/site

or

https://www.myurl.com/requested/site

exist there a system variable to get this informations

Stefan Eickhoff

Friday 28 January 2011 9:51:25 am

Hi cloud stone,

You could use the server template operator from the swark extension.

{if server('SERVER_PORT')|eq(443)}  
 HTTPS CONTEXT
{else}
 HTTP CONTEXT
{/if}

lg

Stefan

cloud stone

Tuesday 01 February 2011 5:09:23 am

thx,

good workaround!

for me, the tread is solved :)