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.

eZ debug

Timing: Jan 30 2025 19:34:56
Script start
Timing: Jan 30 2025 19:34:56
Module start 'layout'
Timing: Jan 30 2025 19:34:56
Module start 'content'
Timing: Jan 30 2025 19:34:56
Module end 'content'
Timing: Jan 30 2025 19:34:56
Script end

Main resources:

Total runtime0.0252 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 588.2578151.2266
Module start 'layout' 0.00490.0033 739.4844220.7266
Module start 'content' 0.00820.0157 960.2109997.8516
Module end 'content' 0.02390.0013 1,958.062529.9766
Script end 0.0252  1,988.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00249.6708140.0002
Check MTime0.00114.2094140.0001
Mysql Total
Database connection0.00124.721210.0012
Mysqli_queries0.00186.938230.0006
Looping result0.00000.043410.0000
Template Total0.00093.710.0009
Template load0.00082.986610.0008
Template processing0.00020.732710.0002
Override
Cache load0.00052.091510.0005
General
dbfile0.004316.863180.0005
String conversion0.00000.018940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs