Page 1 of 1
enforce https all pages
Posted: Thu Sep 25, 2014 11:29 pm
by oclvr
I got SSL certificate, and checked SSL for my site, it works well for account and checkout. Now we try to enforce https on all pages, then to browse site looks ok, but admin login failed. Here is the coding:
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$
https://www.myopencart.com/$1 [R,L]
any help appreciated
Re: enforce https all pages
Posted: Fri Sep 26, 2014 9:59 am
by Dhaupin
Did you check your config.php inside /admin/ to make sure the https urls are set correctly?
Are you able to access a test page in admin via HTTPS? Something that doesn't use OC routes, like /admin/test.html
Also there is a method to do this without htaccess by changing 3 characters in system/library/url.php and using https header (for client memory). This is actually the Google recommend way, ht is counted as a redirect and provides no backwards compatible. Advantage is there is fallback support for things like Bing or old XP users which may not understand SNI or PFS in regards to SSL. Unfortunately its "not an accepted answer" so email or PM and ill give it to ya.
Re: enforce https all pages
Posted: Fri Sep 26, 2014 9:30 pm
by oclvr
Tanks for help, it works as admin login now. But in shopping cart, Qty cannot update,to add to cart and to delete from cart work.
Re: enforce https all pages
Posted: Tue Sep 30, 2014 6:18 am
by Dhaupin
Ah try access your page using chrome where add/update/delete to cart is broke, then hit f12 to open chrome inspector. There should be a tab for "console" in inspector. Open that tab, refresh the page, and try to use cart add (or other javascript things). If there is anything saying "cant load insecure content" or anything about ajax cant load, its probably because the script is set to http mode. The browser may be blocking it since it sees it as "insecure".
This will happen with scripts, css, images, or other media while in https mode. All have to point https (or relative //mysite.com style)
Re: enforce https all pages
Posted: Wed Oct 01, 2014 9:28 am
by vashidu
What i noticed on my site, the cart is opening in https but it says it wants to submit in http.