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]

 

Both comments and pings are currently closed.

Comments are closed.