To redirect all HTTP requests to HTTPS, simply add the following code to your .htaccess file:
RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
0 0
Thank you for voting on this article!