How to redirect HTTP to HTTPS Using .htaccess

How to redirect HTTP to HTTPS Using .htaccess


How to redirect HTTP to HTTPS Using .htaccess


Example Link: https://stackoverflow.com/questions/10489895/http-to-https-through-htaccess


Example Link: https://drive.google.com/drive/folders/14YWe-JPnfCOZEHO9e_UvRnaMnGCFdfoB


 RewriteEngine On

 RewriteCond %{HTTPS} !=on

 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

 RewriteCond %{SERVER_PORT} ^80$

 RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]



HOME



Post a Comment

أحدث أقدم