Page 1 of 1

https and admin page

Posted: Thu Sep 01, 2016 3:58 am
by petes
Hello, I just recently installed SSL on a website and it's working for the users on the main website, for example https://mywebsite.com but the problem is that when go to the admin pages https://mywebsite.com/admin, the interface is broken (like if the href or the css are not loading)

It started happening after adding the redirect for using https, according to godaddy (my host) all I have to do to redirect to https is to add these lines (after 'RewriteEngine On') to the .htaccess file

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]



Opencart Version 2.2.0.0

Re: https and admin page

Posted: Thu Sep 01, 2016 4:37 am
by EvolveWebHosting
Hi,

You shouldn't need to add those lines to the .htaccess file. Just update both config files in the HTTPS section and select the radio button to use SSL under system -->> settings -->> edit -->> Server Tab.

That will make SSL work. If the padlock is broken in your browser, it means you're loading insecure content such as a stylesheet or image. You can use whynopadlock.com to troubleshoot if need be.

Re: https and admin page

Posted: Thu Sep 01, 2016 5:27 am
by petes
EvolveWebHosting wrote:Hi,

You shouldn't need to add those lines to the .htaccess file. Just update both config files in the HTTPS section and select the radio button to use SSL under system -->> settings -->> edit -->> Server Tab.

That will make SSL work. If the padlock is broken in your browser, it means you're loading insecure content such as a stylesheet or image. You can use whynopadlock.com to troubleshoot if need be.
Perfect! Thank you!

Edit:
Had some issues, this may help anybody looking for the same, http://forum.opencart.com/viewtopic.php?t=159011 you may have to edit these files: system/config/catalog.php and system/config/admin.php to enable ssl.

Re: https and admin page

Posted: Thu Sep 01, 2016 7:01 am
by EvolveWebHosting
petes wrote:
EvolveWebHosting wrote:Hi,

You shouldn't need to add those lines to the .htaccess file. Just update both config files in the HTTPS section and select the radio button to use SSL under system -->> settings -->> edit -->> Server Tab.

That will make SSL work. If the padlock is broken in your browser, it means you're loading insecure content such as a stylesheet or image. You can use whynopadlock.com to troubleshoot if need be.
Perfect! Thank you!

Edit:
Had some issues, this may help anybody looking for the same, http://forum.opencart.com/viewtopic.php?t=159011 you may have to edit these files: system/config/catalog.php and system/config/admin.php to enable ssl.
Sorry I forget to mention that part but I'm gald you found it.

Re: https and admin page

Posted: Fri Sep 02, 2016 3:42 am
by petes
Unfortunately I'm still having problems, the padlock seems to appear and disappear randomly depending on the page I'm in, I also changed the code in the system/library/url.php file according to this post (http://forum.opencart.com/viewtopic.php?t=159011), it seemed to work but today when I entered the website, the hommepage was http again, so I did this on the .htaccess file...

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

... and all seemed to work fine again, but then I tried to place a PayPal sandbox order and found out that the orders are being charged but they don't appear in the Dashboard (not even in "Recent Activity"). I figured out how to make them appear but the only way to do it is to click on the "Return to mywebsite.com" link in the PayPal confirmation page, If I don't click there, the order wont be displayed in the Dashboard.

So that's basically the worst case scenario if you ask me, I've been working on this website for almost 2 months and now I feel my options are to delete all and take the chances with 2.1.0.2 or start all over again with Wordpress because unfortunately Opencart is to buggy to rely on it :(

OpenCart 2.2.0.0

Re: https and admin page

Posted: Fri Sep 02, 2016 6:15 am
by EvolveWebHosting
petes wrote:Unfortunately I'm still having problems, the padlock seems to appear and disappear randomly depending on the page I'm in, I also changed the code in the system/library/url.php file according to this post (http://forum.opencart.com/viewtopic.php?t=159011), it seemed to work but today when I entered the website, the hommepage was http again, so I did this on the .htaccess file...

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

... and all seemed to work fine again, but then I tried to place a PayPal sandbox order and found out that the orders are being charged but they don't appear in the Dashboard (not even in "Recent Activity"). I figured out how to make them appear but the only way to do it is to click on the "Return to mywebsite.com" link in the PayPal confirmation page, If I don't click there, the order wont be displayed in the Dashboard.

So that's basically the worst case scenario if you ask me, I've been working on this website for almost 2 months and now I feel my options are to delete all and take the chances with 2.1.0.2 or start all over again with Wordpress because unfortunately Opencart is to buggy to rely on it :(

OpenCart 2.2.0.0
The padlock is broken on various pages because you're calling insecure items such as images or external stylesheets. Take the URL where the padlock is broken and go to whynopadlock.com and see what it tells you. It will list all of the insecure items and then you can fix them.