To redirect everything that comes to a http to https site in apache
use the redirect command. open the 000-default.conf file located in /etc/apache2/sites-avalable/
$ sudo nano /etc/apache2/sites-available/000-default.conf
and set the values as follows.
use the redirect command. open the 000-default.conf file located in /etc/apache2/sites-avalable/
$ sudo nano /etc/apache2/sites-available/000-default.conf
and set the values as follows.
save and restart the Apache server.
$ sudo service apache2 restart.