<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Redirect To SSL Using Apache&#8217;s .htaccess</title>
	<atom:link href="http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/feed/" rel="self" type="application/rss+xml" />
	<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/</link>
	<description>cat /dev/random</description>
	<lastBuildDate>Sat, 04 Jul 2009 08:07:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sebastijan</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-899082</link>
		<dc:creator>sebastijan</dc:creator>
		<pubDate>Sat, 04 Jul 2009 08:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-899082</guid>
		<description>You can do a classical redirect in apache conf.

Redirect /  https://mypage.com/

I have another question.

How do exclude certain pages from being redirected to https?

Thanks</description>
		<content:encoded><![CDATA[<p>You can do a classical redirect in apache conf.</p>
<p>Redirect /  <a href="https://mypage.com/" rel="nofollow">https://mypage.com/</a></p>
<p>I have another question.</p>
<p>How do exclude certain pages from being redirected to https?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AA</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-860560</link>
		<dc:creator>AA</dc:creator>
		<pubDate>Wed, 22 Apr 2009 00:17:37 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-860560</guid>
		<description>I like the May 23rd updated solution best.
The problem with hard coding a redirect to something like http://site/something, at least for what I want, I just want to add https to whatever they typed.  I don&#039;t want to send them to a set home page but rather what they typed, just secure.
That&#039;s why I like the first solution best.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Yay!
I don&#039;t have to worry about where I put this or what site, as long as it has ssl enabled.</description>
		<content:encoded><![CDATA[<p>I like the May 23rd updated solution best.<br />
The problem with hard coding a redirect to something like <a href="http://site/something" rel="nofollow">http://site/something</a>, at least for what I want, I just want to add https to whatever they typed.  I don&#8217;t want to send them to a set home page but rather what they typed, just secure.<br />
That&#8217;s why I like the first solution best.</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule (.*) <a href="https://%" rel="nofollow">https://%</a>{HTTP_HOST}%{REQUEST_URI}</p>
<p>Yay!<br />
I don&#8217;t have to worry about where I put this or what site, as long as it has ssl enabled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: breadbaker</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-781905</link>
		<dc:creator>breadbaker</dc:creator>
		<pubDate>Sat, 14 Mar 2009 20:29:20 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-781905</guid>
		<description>I am sorry to tell you, that those examples won&#039;t work if you are on a non standard http port, e.g. http://www.example.com:8888/ will redirect to https://www.example.com:8888/

use this instead:

[code]
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI}
[/code]</description>
		<content:encoded><![CDATA[<p>I am sorry to tell you, that those examples won&#8217;t work if you are on a non standard http port, e.g. <a href="http://www.example.com:8888/" rel="nofollow">http://www.example.com:8888/</a> will redirect to <a href="https://www.example.com:8888/" rel="nofollow">https://www.example.com:8888/</a></p>
<p>use this instead:</p>
<p>[code]<br />
RewriteEngine On<br />
RewriteCond %{HTTPS} off<br />
RewriteRule (.*) <a href="https://%" rel="nofollow">https://%</a>{SERVER_NAME}%{REQUEST_URI}<br />
[/code]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-759496</link>
		<dc:creator>Derek</dc:creator>
		<pubDate>Wed, 04 Mar 2009 05:40:44 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-759496</guid>
		<description>I had to add [R=301,L] to my RewriteRule to get this working with wildcard subdomains.

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]</description>
		<content:encoded><![CDATA[<p>I had to add [R=301,L] to my RewriteRule to get this working with wildcard subdomains.</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTPS} !on<br />
RewriteRule (.*) <a href="https://%" rel="nofollow">https://%</a>{HTTP_HOST}%{REQUEST_URI} [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kev</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-757725</link>
		<dc:creator>Kev</dc:creator>
		<pubDate>Sun, 01 Mar 2009 03:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-757725</guid>
		<description>RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Simple, elegant, works brilliantly.
THANKS!</description>
		<content:encoded><![CDATA[<p>RewriteEngine On<br />
RewriteCond %{HTTPS} !on<br />
RewriteRule (.*) <a href="https://%" rel="nofollow">https://%</a>{HTTP_HOST}%{REQUEST_URI}</p>
<p>Simple, elegant, works brilliantly.<br />
THANKS!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gimi</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-755114</link>
		<dc:creator>Gimi</dc:creator>
		<pubDate>Mon, 23 Feb 2009 22:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-755114</guid>
		<description>To redirect a specific url to https use RewriteCond
RewriteCond %{HTTPS} off
  RewriteCond %{REQUEST_URI} =/secure #You can have multiple rewrite cond
  RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
 
To redirect the rest of the site from https to http:

  RewriteCond %{HTTPS} on
  RewriteCond %{REQUEST_URI} !=/secure
  RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]</description>
		<content:encoded><![CDATA[<p>To redirect a specific url to https use RewriteCond<br />
RewriteCond %{HTTPS} off<br />
  RewriteCond %{REQUEST_URI} =/secure #You can have multiple rewrite cond<br />
  RewriteRule (.*) <a href="https://%" rel="nofollow">https://%</a>{HTTP_HOST}%{REQUEST_URI} [R=301,L]</p>
<p>To redirect the rest of the site from https to http:</p>
<p>  RewriteCond %{HTTPS} on<br />
  RewriteCond %{REQUEST_URI} !=/secure<br />
  RewriteRule (.*) <a href="http://%" rel="nofollow">http://%</a>{HTTP_HOST}%{REQUEST_URI} [R=301,L]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Un peu de tout &#187; Archives du Blog &#187; Apache: redirection en https avec .htaccess</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-745581</link>
		<dc:creator>Un peu de tout &#187; Archives du Blog &#187; Apache: redirection en https avec .htaccess</dc:creator>
		<pubDate>Fri, 06 Feb 2009 01:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-745581</guid>
		<description></description>
		<content:encoded><![CDATA[<p>[...] me suis basé sur ce billet de Joseph Scott, solution améliorée par Nicolas [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: unhitched</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-735844</link>
		<dc:creator>unhitched</dc:creator>
		<pubDate>Tue, 20 Jan 2009 13:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-735844</guid>
		<description>worked for me - thanks!</description>
		<content:encoded><![CDATA[<p>worked for me &#8211; thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Leslie</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-2/#comment-729063</link>
		<dc:creator>Leslie</dc:creator>
		<pubDate>Fri, 09 Jan 2009 15:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-729063</guid>
		<description>Boy am I late to the party on this, but thanks! I spent hours looking for code that would work and this did the trick.</description>
		<content:encoded><![CDATA[<p>Boy am I late to the party on this, but thanks! I spent hours looking for code that would work and this did the trick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Taylor</title>
		<link>http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/comment-page-1/#comment-676413</link>
		<dc:creator>Taylor</dc:creator>
		<pubDate>Thu, 30 Oct 2008 00:05:26 +0000</pubDate>
		<guid isPermaLink="false">http://joseph.randomnetworks.com/archives/2004/07/22/redirect-to-ssl-using-apaches-htaccess/#comment-676413</guid>
		<description>I currently have my .htaccess file that sends all of the requests for my website to https: however I am trying to host two different sites under the same hosting.  Well when I put in the URL then it redirects me back to the other site.  Does anyone know the code to only redirect within the root directory and leave the subdirectories alone?

This is my  current code:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
SSLOptions +StrictRequire
SSLRequireSSL
SSLRequire %{HTTP_HOST} eq &quot;example.com&quot;
ErrorDocument 403 https://example.com

Thanks</description>
		<content:encoded><![CDATA[<p>I currently have my .htaccess file that sends all of the requests for my website to https: however I am trying to host two different sites under the same hosting.  Well when I put in the URL then it redirects me back to the other site.  Does anyone know the code to only redirect within the root directory and leave the subdirectories alone?</p>
<p>This is my  current code:</p>
<p>Options +FollowSymLinks<br />
RewriteEngine On<br />
RewriteBase /<br />
SSLOptions +StrictRequire<br />
SSLRequireSSL<br />
SSLRequire %{HTTP_HOST} eq &#8220;example.com&#8221;<br />
ErrorDocument 403 <a href="https://example.com" rel="nofollow">https://example.com</a></p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
