[sitemason-developers] Creating a Secure PHP Template for HTTPS

4 views
Skip to first unread message

Sitemason

unread,
Apr 21, 2010, 12:26:32 PM4/21/10
to Sitemason Developers
To make a secure PHP template, just prepend any asset links (images,
stylesheets, javascript, etc) with the below:

<?php echo $content_xml->secure_image_url ?>

For example, to get a secure link for a stylesheet:

<link href="/styles.css" rel="stylesheet" type="text/css" />

becomes

<link href="<?php echo $content_xml->secure_image_url ?>/styles.css"
rel="stylesheet" type="text/css" />

The secure_image_url XML only displays when a secure request is made,
so if it's not a secure page, nothing is displayed, and it keeps the
request relative.


--
Subscription settings: http://groups.google.com/group/sitemason-developers/subscribe?hl=en
Reply all
Reply to author
Forward
0 new messages