InMotion Hosting Support Center

Redirecting http into https

Category: Ssl

InMotionFans
n/a Points
Asked:
2015-08-14 11:26 am EST

Hits: 2,079
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?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

TJEdens
Staff
10,077 Points
2015-08-14 11:40 am EST
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

You must login before you can post a comment about this answer.

Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!