I'm converting a Magento 1.9 website from http: to fully secure https: frontend.
Ive used the following code at the top of the .htaccess file.
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
I would just like to verify that to preserve link authority does this code create a permanent 301 redirect from http: to the new https: urls?
Can anyone confirm this is the case or is there something else that needs to be done to transfer url link authority?
Thanks
Nick
Hi James,
Thank you for your answer but does this code in the .htacess file generate a permanent 301 redirect for all the incoming http: links to https: links?
kind regards
Nick
You can include this line in your virtual host file located in etc/httpd/conf/httpd.conf, sometimes it located in etc/httpd/conf.d/yourdomain.conf
RewriteEngine On Redirect permanent / https://yourwebsite.com/
So your conf file will look like this
<VirtualHost *:80> RewriteEngine On Redirect permanent / https://yourwebsite.com/ ServerName yourwebsite.com ServerAlias *.yourwebsite.com DocumentRoot /var/www/html/yourwebsite.com </VirtualHost>
Hope this helps