{"id":30099,"date":"2017-05-08T03:01:55","date_gmt":"2017-05-07T17:01:55","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=30099"},"modified":"2017-09-22T08:54:43","modified_gmt":"2017-09-21T22:54:43","slug":"ssl-supervisory-web-application-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/ssl-supervisory-web-application-primer-tutorial\/","title":{"rendered":"SSL Supervisory Web Application Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/SSL\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"SSL Supervisory Web Application Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/SSL\/ssl_rjmprogramming.jpg\" title=\"SSL Supervisory Web Application Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">SSL Supervisory Web Application Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve decided we can&#8217;t just jump straight to the idea of all the URLs at RJM Programming being accessible in an <i>https:<\/i> <a target=_blank title='SSL information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Transport_Layer_Security'>SSL<\/a> way &#8220;just like that&#8221;.  It could take a while to ease our way into that scenario.  So what is the next best thing?  Create an environment where there is a supervisory web application overseeing child (HTML) iframe web applications, that are called with the <i>https:<\/i> protocol because all their URLs are defined with a <i>\/\/<\/i> prefix propogated down from their parent web application to inherit the protocol of the parent.  In the meantime, we&#8217;re going to ensure that the parent gets an <i>https:<\/i> prefixed <i>top.document.URL<\/i> associated with it.<\/p>\n<p>Now, back at <a target=_blank title='SSL Certificate Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/ssl-certificate-primer-tutorial\/'>SSL Certificate Primer Tutorial<\/a> we established that &#8230;<\/p>\n<ul>\n<li>a web server 301 HTTP: redirect could do this &#8230;<\/li>\n<li>or we could do an Apache (web server) mod_rewrite module controlled <i>.htaccess<\/i> scenario in a new web server folder of interest, as explained at <a target=_blank title='Apache http: redirect to https: via Apache mod-rewrite module and an .htaccess file' href='https:\/\/www.sslshopper.com\/apache-redirect-http-to-https.html'>this webpage<\/a> as &#8230;<br \/>\n<code><br \/>\nRewriteEngine On<br \/>\nRewriteCond %{HTTPS} off<br \/>\nRewriteRule (.*) https:\/\/%{SERVER_NAME}\/$1 [R,L]<br \/>\n<\/code><br \/>\n &#8230; but we decide to &#8230;\n<\/li>\n<li>or we could write a redirecting piece of Javascript <i>document.body<\/i> onload event piece of logic <b>as per<\/b> &#8230;<br \/>\n<code><br \/>\n\/\/ more Javascript here<br \/>\n<b>function startoff() {<br \/>\n  var j;<br \/>\n  if (isoft &lt; 0) {<br \/>\n    if (document.URL.indexOf('HTTP') != 0 && document.URL.indexOf('https:') != 0) location.href='https:' + document.URL.replace('http:','').replace('https:','');<\/b><br \/>\n    for (j=0; j&lt;softwares.length; j++) {<br \/>\n      selsoft=selsoft.replace(\"&lt;\/select&gt;\",String.fromCharCode(10) + \"&lt;option value='\" + softwares[j].split(';')[1] + \"'&gt;\" + softwares[j].split(';')[0] + \"&lt;\/option&gt;&lt;\/select&gt;\");<br \/>\n    }<br \/>\n    document.getElementById('wa').title=\"Click to have here the dropdown \" + selsoft;<br \/>\n  <b>}<\/b><br \/>\n  isoft=eval((isoft + 1) % softwares.length);<br \/>\n  if (document.getElementById('dcontent').innerHTML.indexOf('&lt;iframe ') == -1) {<br \/>\n    document.getElementById('ibut').value=softwares[isoft].split(';')[0];<br \/>\n    document.getElementById('ibut').title=softwares[isoft].split(';')[1];<br \/>\n  }<br \/>\n  setTimeout(startoff,5000);<br \/>\n<b>}<\/b><br \/>\n\/\/ more Javascript here<br \/>\n&lt;\/script><br \/>\n&lt;\/head><br \/>\n&lt;body <b>onload='startoff();'<\/b> style='background-color:lightblue;'&gt;<br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; and we plump for that last idea, but you should, yourself, if you are wanting good SEO outcomes, consider that the other two ideas might result in better SEO outcomes.<\/p>\n<p>Which leaves us with today&#8217;s SSL supervisory web application with this <a target=_blank title='SSL Supervisory at RJM Programming' href='https:\/\/www.rjmprogramming.com.au\/SSL\/'>live run<\/a> link, and this &#8220;first draft&#8221; HTML and Javascript code you could call <a target=_blank title='ssl_rjmprogramming.html' href='https:\/\/www.rjmprogramming.com.au\/SSL\/ssl_rjmprogramming.html_GETME'>ssl_rjmprogramming.html<\/a> as you see fit.  It is a web application that starts out with big &#8230; really big &#8230; HTML input type=button buttons that are replaced by HTML child iframe hosted (SSL protocoled) web applications.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d30099' onclick='var dv=document.getElementById(\"d30099\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/file\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d30099' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve decided we can&#8217;t just jump straight to the idea of all the URLs at RJM Programming being accessible in an https: SSL way &#8220;just like that&#8221;. It could take a while to ease our way into that scenario. So &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/ssl-supervisory-web-application-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,37],"tags":[42,2198,85,354,355,360,513,519,576,651,714,725,744,804,932,997,999,1035,1129,1166,1682,2056,1222,1319,1343,1368,1411],"class_list":["post-30099","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-htaccess","tag-301-redirect","tag-apache","tag-dom","tag-domain","tag-download","tag-google","tag-google-charts","tag-html","tag-javascipt","tag-local-web-server","tag-mac-os-x","tag-mamp","tag-mod_rewrite","tag-php","tag-programming","tag-project","tag-redirect","tag-sftp","tag-software-2","tag-ssl","tag-suite","tag-supervisor","tag-tutorial","tag-upload","tag-vi","tag-web-server"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30099"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=30099"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30099\/revisions"}],"predecessor-version":[{"id":33103,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/30099\/revisions\/33103"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=30099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=30099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=30099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}