<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
(I apologize if this comes through twice, the first time didn't show up
in the list. This is my first time contributing and maybe I didn't wait
long enough or something.)<br>
<br>
Two things. First about the www since you may have solved the rest, and
then what Apache says about .htaccess. I assume you are using Apache
and have a Virtual Private Server hosting account.<br>
<br>
1) Do you have something like the following in your httpd.conf file?
The first part should take care or you www access problem and the
second part changes http requests into https requests.<br>
<br>
&lt;VirtualHost *:80&gt;<br>
&nbsp;&nbsp;&nbsp; ServerName yourdomain.com<br>
&nbsp;&nbsp;&nbsp; ServerAlias <a class="moz-txt-link-abbreviated"
 href="http://www.yourdomain.com">www.yourdomain.com</a><br>
&nbsp;&nbsp;&nbsp; DocumentRoot /var/www/html<br>
### next 3 lines change http access to https ###<br>
&nbsp;&nbsp;&nbsp; RewriteEngine On<br>
&nbsp;&nbsp;&nbsp; RewriteCond %{HTTPS} off<br>
&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)$ <a class="moz-txt-link-freetext"
 href="https://www.yourdomain.com$1">https://www.yourdomain.com$1</a>
[R=301,L]<br>
&lt;/VirtualHost&gt;<br>
<br>
2) I would put the above in your httpd.conf file instead of .htaccess.
The reason for this is explained in the Apache documentation at
<a class="moz-txt-link-freetext"
 href="http://httpd.apache.org/docs/current/howto/htaccess.html">http://httpd.apache.org/docs/current/howto/htaccess.html</a>
in the <b>When
(not) to use .htaccess files</b> section. Part is quoted below, but
there is more:<br>
<br>
"In general, you should never use <code>.htaccess</code> files unless
you don't have access to the main server configuration file. There is,
for example, a prevailing misconception that user authentication should
always be done in <code>.htaccess</code> files. This is simply not the
case. You can put user authentication configurations in the main server
configuration, and this is, in fact, the preferred way to do things."<br>
<br>
I hope this helps and that I have not misunderstood your problem.<br>
<br>
Robert Alter<br>
<br>
<br>
Lynn Stott (Stott Design) wrote:
<blockquote
 cite="mid04225C20-2921-4E3E-A7F9-F57FC861B650@stottdesign.com"
 type="cite">Thanks Jamie for sticking with me!
  <div><br>
  </div>
  <div>This works when someone browses without the "www", but doesn't
work with <a href="http://www.mysite.com">www.mysite.com</a>
  <div><br>
  <div><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
  <div style=""><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
  <div style=""><span class="Apple-style-span"
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
  <div style="">Thanks,<br>
Lynn Stott<br>
  <a href="http://www.stottdesign.com">www.stottdesign.com</a><br>
208.871.0073<br>
  <br>
  </div>
  </span></div>
  </span></div>
  </span></span></div>
  <br>
  <div>
  <div>On Jul 22, 2011, at 10:32 AM, Jamie Holly wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div bgcolor="#ffffff" text="#000000"> Shouldn't have done it from
memory LOL. Try this one:<br>
    <br>
RewriteCond %{SERVER_PORT} !^443$<br>
RewriteRule ^(.*)$ <a class="moz-txt-link-freetext" href="https://%/">https://%</a>{SERVER_NAME}$1
[L,R]<br>
    <br>
    <br>
    <pre class="moz-signature" cols="72">Jamie Holly
<a class="moz-txt-link-freetext" href="http://www.intoxination.net/">http://www.intoxination.net</a> 
<a class="moz-txt-link-freetext" href="http://www.hollyit.net/">http://www.hollyit.net</a></pre>
    <br>
On 7/22/2011 12:07 PM, Lynn Stott (Stott Design) wrote:
    <blockquote
 cite="mid:4764DEDD-FB6D-480C-8FA9-BBEB60F35AD2@stottdesign.com"
 type="cite">This doesn't work.
      <div><br>
      <div> <span class="Apple-style-span"
 style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="border-collapse: separate; font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
      <div style=""><span class="Apple-style-span"
 style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
      <div style=""><span class="Apple-style-span"
 style="border-collapse: separate; font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
      <div style="">Thanks,<br>
Lynn Stott<br>
      <a moz-do-not-send="true" href="http://www.stottdesign.com/">www.stottdesign.com</a><br>
208.871.0073<br>
      <br>
      </div>
      </span></div>
      </span></div>
      </span></span> </div>
      <br>
      <div>
      <div>On Jul 22, 2011, at 9:56 AM, Jamie Holly wrote:</div>
      <br class="Apple-interchange-newline">
      <blockquote type="cite">
        <div bgcolor="#ffffff" text="#000000"> Generic to force
everything to ssl:<br>
        <br>
ReWriteCond %{SERVER_PORT} !^443$<br>
RewriteRule ^/(.*) <a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="https://%/">https://%</a>{HTTP_HOST}/$1
[NC,R,L]<br>
        <pre class="moz-signature" cols="72">Jamie Holly
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.intoxination.net/">http://www.intoxination.net</a> 
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.hollyit.net/">http://www.hollyit.net</a></pre>
        <br>
On 7/22/2011 11:52 AM, Lynn Stott (Stott Design) wrote:
        <blockquote
 cite="mid:CB623145-FA50-4E58-9539-3944EB3D503D@stottdesign.com"
 type="cite">Yes, Linux, VPS, not shared.
          <div><br>
          </div>
          <div>No support on this from my host... on my own with this
and I just don't know .htaccess.&nbsp;</div>
          <div><br>
          <div> <span class="Apple-style-span"
 style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;"><span
 class="Apple-style-span"
 style="border-collapse: separate; font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
          <div style=""><span class="Apple-style-span"
 style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
          <div style=""><span class="Apple-style-span"
 style="border-collapse: separate; font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium;">
          <div style="">Thanks,<br>
Lynn Stott<br>
          <a moz-do-not-send="true" href="http://www.stottdesign.com/">www.stottdesign.com</a><br>
208.871.0073<br>
          <br>
          </div>
          </span></div>
          </span></div>
          </span></span> </div>
          <br>
          <div>
          <div>On Jul 22, 2011, at 8:17 AM, Shai Gluskin wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">Lynn,
            <div><br>
            </div>
            <div>Are you on a Linux server? I think you are talking
about using a mod_rewrite solution which, I think, only works on Linux.</div>
            <div><br>
            </div>
            <div>mod_rewrite is incredibly powerful and fussy. I
wouldn't risk advising you on the actual script.</div>
            <div><br>
            </div>
            <div>I actually think this kind of question might best be
handled by the support team at your server company. I'm not saying you
shouldn't ask here... but if you don't get a response that helps, that
is another route to go.</div>
            <div><br>
            </div>
            <div>Shai</div>
            <div><br>
            <div class="gmail_quote">On Fri, Jul 22, 2011 at 10:10 AM,
Lynn Stott (Stott Design) <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:lynn@stottdesign.com">lynn@stottdesign.com</a>&gt;</span>
wrote:<br>
            <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
              <div style="">Can some help with .htaccess?&nbsp;<br>
              <br>
How do you redirect all&nbsp;<br>
              <a moz-do-not-send="true" href="https://www.site.com/"
 target="_blank">https://www.site.com</a>&nbsp;<br>
              <a moz-do-not-send="true" href="http://www.site.com/"
 target="_blank">http://www.site.com</a>&nbsp;<br>
              <a moz-do-not-send="true" href="http://site.com/"
 target="_blank">http://site.com</a><br>
              <br>
to<br>
              <br>
              <a moz-do-not-send="true" href="https://site.com/"
 target="_blank">https://site.com</a><br>
              <br>
Thanks,<br>
              <div> <span
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><span
 style="border-collapse: separate; color: rgb(0, 0, 0); font-family: 'Century Gothic'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;">
              <div style=""> <span
 style="border-collapse: separate; color: rgb(0, 0, 0); font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;">
              <div style=""> <span
 style="border-collapse: separate; color: rgb(0, 0, 0); font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;">
              <div style=""> <br>
              </div>
              </span></div>
              </span></div>
              </span></span></div>
              </div>
              <br>
--<br>
[ Drupal support list | <a moz-do-not-send="true"
 href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a>
]<br>
            </blockquote>
            </div>
            <br>
            </div>
-- <br>
[ Drupal support list | <a moz-do-not-send="true"
 href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]</blockquote>
          </div>
          <br>
          </div>
        </blockquote>
        </div>
-- <br>
[ Drupal support list | <a moz-do-not-send="true"
 href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]</blockquote>
      </div>
      <br>
      </div>
    </blockquote>
    </div>
-- <br>
[ Drupal support list | <a href="http://lists.drupal.org/">http://lists.drupal.org/</a>
]</blockquote>
  </div>
  <br>
  </div>
  </div>
</blockquote>
</body>
</html>