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 :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.