How to redirect everything to HTTPS

Redirect all non-HTTPS traffic to HTTPS using htaccess

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{HTTPS} !on [NC]
 RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>

for more htaccess tips, go to this url:

https://www.leaseweb.com/labs/tag/htaccess/

Download a file using command line in Windows

If you want to download a file using only command line, you can create a batch file (.bat) with the following :

download.bat

@Echo OFF
SetLocal EnableDelayedExpansion
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('http://www.source.com/test.txt', 'C:\destination\test.txt')

Of course you have to change the source and destination according to your needs.

The only problem is that running this file will open the command prompt for few seconds .. to avoid that you can create a VBscript file (.vbs) that will run the batch file in the background without the appearance of the command prompt.

runme.vbs

Set oShell = CreateObject ("Wscript.Shell") 
Dim strArgs
strArgs = "cmd /c download.bat"
oShell.Run strArgs, 0, false

Important article about future of the web apps

Here is a good article about the web apps and how it is going better. Mainly talking about PWA (Progressive Web App) , WEBASSEMBLY and HOUDINI

https://www.theverge.com/circuitbreaker/2018/4/11/17207964/web-apps-quality-pwa-webassembly-houdini