Redirect code from http to https by using .htaccess?

Your can redirect all http (Non-secure) URL to https by using following code in .htaccess file.

RewriteEngine on
Options +FollowSymLinks
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

About Anant 386 Articles
Senior technical writer