How i could redirect my Wordpress web site from http to https (ssl)?

Wordpress is tricky when you need to work out the http --> https redirection. There are many plugins out there that could help you with this redirection. This is a simple way using .htaccess rewrite rules to handle it. Replace your default rules installed by Wordpress installation in your .htaccess file.

FROM:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

TO:

# BEGIN WordPress
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution