<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Verdana",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Verdana",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-GB link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt'>On 24.04.17 12:04, Richard Sidlin wrote:</span><span style='font-size:12.0pt;mso-fareast-language:EN-GB'><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Guys</span> <o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>A basic question if I may. I have a Wordpress site with some other software that is accessed on one of the sub folders. i.e. <a href="http://www.wordpresssite.co.uk">www.wordpresssite.co.uk</a> and <a href="http://www.wordpresssite.co.uk/race-entry">www.wordpresssite.co.uk/race-entry</a> .</span> <o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana",sans-serif'>Now, I am about to add a LetsEncrypt SSL to the Wordpress site, that’s easy enough but what I want is anyone that types the standard www etc to be forced to <a href="https://www">https://www</a> etc as I have a Stripe payment facility off the sub folder and that needs to be on https.</span> <o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB'>I did this by editing in </span><tt><span style='font-size:10.0pt;background:#FFFFCC;mso-fareast-language:EN-GB'>/etc/httpd/conf/vhosts/siteXX.include</span></tt><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB'> and adding:<o:p></o:p></span></p><pre style='background:#FFFFCC'>RewriteEngine  On<br>RewriteCond    %{SERVER_PORT}  !^443$<br>#RewriteRule   ^(.*)$ <a href="https://%25">https://%</a>{HTTP_HOST}/$1   [QSA,NC,R,L]<br>RewriteRule    ^(.*)$ <a href="https://%25">https://%</a>{HTTP_HOST}$1    [QSA,NC,R,L]<o:p></o:p></pre><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB'>and restarting afterwards the Apache server.<br><br>You might have to try out which one of the two RewriteRules (with or without </span><tt><span style='font-size:10.0pt;background:#FFFFCC;mso-fareast-language:EN-GB'>/</span></tt><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB'> before </span><tt><span style='font-size:10.0pt;background:#FFFFCC;mso-fareast-language:EN-GB'>$1</span></tt><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB'> works out better, mine is without.<br><br>Best regards<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:EN-GB'><br>Meaulnes Legler <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-GB'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Verdana",sans-serif;color:#1F497D;mso-fareast-language:EN-GB'>That’s great, thanks very much.<o:p></o:p></span></p></div></div></body></html>