<?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>i am jack's design &#187; ASP</title>
	<atom:link href="http://www.iamjacksdesign.com/blog/category/programming/asp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.iamjacksdesign.com/blog</link>
	<description>thoughts on freelancing and web development</description>
	<lastBuildDate>Fri, 16 Jul 2010 17:28:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Redirect HTTP To HTTPS Using ASP</title>
		<link>http://www.iamjacksdesign.com/blog/redirect-http-to-https-using-asp/</link>
		<comments>http://www.iamjacksdesign.com/blog/redirect-http-to-https-using-asp/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 18:11:16 +0000</pubDate>
		<dc:creator>Link</dc:creator>
				<category><![CDATA[ASP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.iamjacksdesign.com/blog/?p=275</guid>
		<description><![CDATA[It&#8217;s been a really long time since I had a post with a coding solution here. So today I thought I&#8217;d throw up something I needed earlier this summer for anyone else looking for similar code. On an older site, still running Classic ASP, I needed to redirect anyone visiting a page with standard HTTP [...]<p>a</p>
]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a really long time since I had a post with a coding solution here. So today I thought I&#8217;d throw up something I needed earlier this summer for anyone else looking for similar code.</p>
<p>On an older site, still running Classic ASP, I needed to redirect anyone visiting a page with standard HTTP to the same page using HTTPS. Here&#8217;s the solution which I included at the very top of the page before any other code is called:</p>
<pre name="code" class="csharp:nogutter">&lt;%
	if Request.ServerVariables("HTTPS") = "off" then
		srvname = Request.ServerVariables("SERVER_NAME")
		scrname = Request.ServerVariables("SCRIPT_NAME")
		response.redirect("https://" &#038; srvname &#038; scrname)
	end if
%>
</pre>
<p>Basically, whenever someone visits the page it checks to see if they came from http://www.example.com/page and then redirects them straight to http<b>s</b>://www.example.com/page to ensure they&#8217;re visiting the page on a secure connection.</p>
<p>There are probably much better ways to do this but since this is what worked for me I thought I&#8217;d share.</p>
<p>a</p>
<img src="http://www.iamjacksdesign.com/blog/?ak_action=api_record_view&id=275&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.iamjacksdesign.com/blog/redirect-http-to-https-using-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
