Redirecting http into https

Avatar
  • Answered
I have been having a problem with directly the website from http into https. I tried to integrate the credit card payment into the website so customer can pay using credit card. It is showing a message that the page is unsecure. I did purchase an SSL certificate and the web hosting company said that it was properly installed into my website. Under my .htaccess file, it show a code that starts with # BEGIN WordPress and ends with # END WordPress. I tried copy and paste the following codes before " # BEGIN WordPress" and right after it and then the website won't load anymore.
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R=301,L]

I changed the yourdomain into my website domain name and in wordpress, under settings --> general, changed the http into https in two fields.

What am I doing wrong?
Avatar
anonymous
Hello, Thank you for submitting a question about Redirecting http into https. I am not completely sure why that would not be working. However, I would suggest the method below for your scenario. If this still does not work can you please provide your domain so we may try additional testing? Also the code needs to go above the # Begin WordPress. RewriteEngine On RewriteCond %{HTTP_HOST} ^example\.com [NC] RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L] Best Regards, TJ Edens