Redirecting plain HTTP requests to HTTPS in a secure environment can be a daunting task, especially for those unfamiliar with modern web development. However, it's essential to grasp the security implications of such actions. When you redirect an HTTP request to HTTPS (SSL/TLS), you're essentially encrypting the data being transmitted between your client and server.
For instance, if a user accesses your website through their browser, the default port is 80 for HTTP and 443 for HTTPS. However, when you redirect an HTTP request to HTTPS using the SSL/TLS protocol, the traffic is re-directed over the secure connection at port 443.
https://conferences.law.stanford.edu/ipsummerschool2022/2014/01/21/porta-est-nascetur-proin-3