<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chad Von Lind &#187; Website Designer, WordPress Programmer &amp; Theme Developer &#8211; Chad Von Lind</title>
	<atom:link href="http://vonlind.com/tag/http/feed/" rel="self" type="application/rss+xml" />
	<link>http://vonlind.com</link>
	<description>Web Design Specialist, WordPress, CMS and eCommerce</description>
	<lastBuildDate>Mon, 17 Oct 2011 18:27:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHP Script Switch Page to HTTPS</title>
		<link>http://vonlind.com/2009/04/php-script-switch-page-to-https/</link>
		<comments>http://vonlind.com/2009/04/php-script-switch-page-to-https/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 03:29:00 +0000</pubDate>
		<dc:creator>Chad Von Lind</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://vonlind.com?p=220</guid>
		<description><![CDATA[Here is a quick php script that you can add to the top of any page you want to be secure. Obviously, it requires you actually have an SSL Certificate all set up on your domain first. &#60;?php if&#40;empty&#40;$_SERVER&#91;'HTTPS'&#93;&#41;&#41; &#123; // If not, redirect $newurl = 'https://'.$_SERVER&#91;'SERVER_NAME'&#93;.$_SERVER&#91;'REQUEST_URI'&#93;; header&#40;&#34;location: $newurl&#34;&#41;; exit&#40;&#41;; &#125; &#160; ?&#62;]]></description>
			<content:encoded><![CDATA[<p>Here is a quick php script that you can add to the top of any page you want to be secure. Obviously, it requires you actually have an SSL Certificate all set up on your domain first.<span id="more-220"></span></p>
<div class="wp_syntax">
<div class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTPS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// If not, redirect</span>
    <span style="color: #000088;">$newurl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'https://'</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'SERVER_NAME'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;location: <span style="color: #006699; font-weight: bold;">$newurl</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</div>
</div>
<p><img src="http://vonlind.com/?ak_action=api_record_view&#038;id=220&#038;type=feed" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://vonlind.com/2009/04/php-script-switch-page-to-https/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

