How to Redirect all HTTP requests to HTTPS
-
Hey everyone, I recently have moved to HTTPS version from HTTP. But since then, I am into trouble and problem is not solved.
So, my query is, How to redirect user to HTTPS version of site regardless whatever he types. For ex., Let me explain:-abc.com --->>> https://www.abc.com/ www.abc.com --->>> https://www.abc.com/ https://abc.com --->>> https://www.abc.com/Moreover, If in future I make my mind to move site to
https://abc.cominstead ofhttps://www.abc.com, then what will be the code for this? Let me give example for this too.abc.com --->>> https://abc.com/ www.abc.com --->>> https://abc.com/ https://www.abc.com --->>> https://abc.com/>>> I have seen that if a user types
https://abc.comand I want it to redirect tohttps://www.abc.com/then browser give warning about its security before redirecting. Hence, asks for users confirmation. This is bad thing and can destroy site owner image. This should not happen. 😀
Please suggest .htaccess code for both types separately. For info, using Apache Web Server. 😀
The topic ‘How to Redirect all HTTP requests to HTTPS’ is closed to new replies.