Actions

Redirect http to https

From Lunarpages Web Hosting Wiki

Revision as of 20:30, 27 December 2019 by Lunarwiki (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Q: How can I redirect users from my http pages to the https pages?

A: You can do this by adding the following lines to your .htaccess file in /public_html/

RewriteEngine on
#Options +FollowSymlinks
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*) https://yourdomain.com/$1 [R,L]

Replace yourdomain.com with your primary domain name.

Please note: This will redirect all pages in your site to https. Most shopping carts can use http for viewing and will default to https on the page where a customer enters their credit card information.