Forums / Basic Configuration / stylesheet not loading with https recently installed

stylesheet not loading with https recently installed

Locked

Started by roekoe on 23 Apr 2010, 7:17 AM · Views: 6,885

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
23 Apr 2010, 7:17 AM
#1
roekoe avatar

roekoe

New Zenner

Join Date:
Feb 2010
Posts:
38
Plugin Contributions:
0

stylesheet not loading with https recently installed

Hello,

I've a problem with ie8 and https traffic. I've installed a shared certificate for my webshop. What happens next is when i login as a customer the https/ssl site doesn't load the stylesheet.

I've setup the site once again in a test environment with a clean install and the same thing happens. the test site address is www.vuurmes.nl and from here you can login or use this direct link.

When i use firefox everything works fine.

https://www.vuurmes.nl points to the map "funtattoo" configured in my hosting manager from my hosting company.

https://funtattoo-nl.firstfind.nl points directly to the folder "funtattoo", this has been setup by my hosting provider.

Any help is appreciated.

Michael Hayes

This is my configure.php without SQL information:

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'http://www.vuurmes.nl');
define('HTTPS_SERVER', 'https://funtattoo-nl.firstfind.nl');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/vuurmes.nl/public_html/funtattoo/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

23 Apr 2010, 3:22 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: stylesheet not loading with https recently installed

Your problem is that your hosting company's server isn't properly advertising that it's running in SSL mode. Thus Zen Cart is sending the non-SSL link for reference to your stylesheets and images etc.

If your hosting company can't send traditional information with the page, then you're not going to be able to use SSL properly there.

Zen Cart has built-in detection for all the common ways in which SSL information is set up (which apparently your hosting company isn't doing):
It checks for the presence of at least one of these pieces of information being set in $_SERVER:

  • 'HTTPS' set to '1' or 'on'
  • 'SERVER_PORT' set to 443
  • 'SCRIPT_URI' containing "https:"
  • 'HTTP_SSLSESSIONID' not blank
  • 'HTTP_X_FORWARDED_BY containing 'SSL'
  • 'HTTP_X_FORWARDED_HOST' containing 'https:' or your HTTPS_SERVER value

Your hosting company will need to configure their server to use SSL correctly if you wish to continue using SSL on your site.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Apr 2010, 6:54 AM
#3
roekoe avatar

roekoe

New Zenner

Join Date:
Feb 2010
Posts:
38
Plugin Contributions:
0

Re: stylesheet not loading with https recently installed

DrByte:

Your problem is that your hosting company's server isn't properly advertising that it's running in SSL mode. Thus Zen Cart is sending the non-SSL link for reference to your stylesheets and images etc.

If your hosting company can't send traditional information with the page, then you're not going to be able to use SSL properly there.

Zen Cart has built-in detection for all the common ways in which SSL information is set up (which apparently your hosting company isn't doing):
It checks for the presence of at least one of these pieces of information being set in $_SERVER:

  • 'HTTPS' set to '1' or 'on'
  • 'SERVER_PORT' set to 443
  • 'SCRIPT_URI' containing "https:"
  • 'HTTP_SSLSESSIONID' not blank
  • 'HTTP_X_FORWARDED_BY containing 'SSL'
  • 'HTTP_X_FORWARDED_HOST' containing 'https:' or your HTTPS_SERVER value

Your hosting company will need to configure their server to use SSL correctly if you wish to continue using SSL on your site.

hum. i should contact them then. But i have requested the ssl certificate from them, so you should it must work. I contact them and i'll post the results. I must that they suppor zen cart, they advertise with it of their website. At least they support the software and the upgrades of it.

Thanks for your help.

26 Apr 2010, 10:04 AM
#4
roekoe avatar

roekoe

New Zenner

Join Date:
Feb 2010
Posts:
38
Plugin Contributions:
0

Re: stylesheet not loading with https recently installed

1 more thing. In firefox it works fine, so why should be a configuration issue from the hopsting company. I'm thinking of a stylesheet error which causes ie8 to display the site with an error.

27 Apr 2010, 1:53 PM
#5
qdixon avatar

qdixon

Support Team

Join Date:
Feb 2004
Location:
Simcoe, Ontario, Canada
Posts:
1,906
Plugin Contributions:
1

Re: stylesheet not loading with https recently installed

roekoe:

1 more thing. In firefox it works fine, so why should be a configuration issue from the hopsting company. I'm thinking of a stylesheet error which causes ie8 to display the site with an error.

Classic indicator that your SSL Certificate is installed incorrectly or has a server misconfiguration. Contact your host.

Windows, BSD, Linux, Cisco, Hardware & IT Security Tech
AEIIA - Zen Cart Certified & PCI Compliant Hosting

27 Apr 2010, 8:18 PM
#6
roekoe avatar

roekoe

New Zenner

Join Date:
Feb 2010
Posts:
38
Plugin Contributions:
0

Re: stylesheet not loading with https recently installed

Qdixon:

Classic indicator that your SSL Certificate is installed incorrectly or has a server misconfiguration. Contact your host.
I've had contact with my hosting provider. They managed to https link to my default folder where my nonssl website is hosted. UNfortenately without any luck. I'll contact them once more to find out what the problem can be. Maybe the https link should end in my rootfolder with my hosting company. My website is hosted in the folder "kenji", where my https redirection willl end now aswell.

thanks for your help, i'll post the results.

28 Apr 2010, 3:28 PM
#7
jtheed avatar

jtheed

Zen Follower

Join Date:
Apr 2008
Posts:
356
Plugin Contributions:
2

Re: stylesheet not loading with https recently installed

roekoe:

I've had contact with my hosting provider. They managed to https link to my default folder where my nonssl website is hosted. UNfortenately without any luck. I'll contact them once more to find out what the problem can be. Maybe the https link should end in my rootfolder with my hosting company. My website is hosted in the folder "kenji", where my https redirection willl end now aswell.

thanks for your help, i'll post the results.

I agree with Qdixon that your SSL is installed incorrectly. Firefox works but says the certificate is invalid. IE works if you tell it that it's ok to load the unseccure parts of the page as you have a lot of http:// defined in the page, so there is secure and non-secure pages. IE then ignores the certificate. When you tell it not to load the pages, it does not load the css files because they are not coming from a secure page.

29 Apr 2010, 1:22 PM
#8
roekoe avatar

roekoe

New Zenner

Join Date:
Feb 2010
Posts:
38
Plugin Contributions:
0

Re: stylesheet not loading with https recently installed

JTheed:

I agree with Qdixon that your SSL is installed incorrectly. Firefox works but says the certificate is invalid. IE works if you tell it that it's ok to load the unseccure parts of the page as you have a lot of http:// defined in the page, so there is secure and non-secure pages. IE then ignores the certificate. When you tell it not to load the pages, it does not load the css files because they are not coming from a secure page.
Hello,

I've contacted my provider and this their response. They're sure that ssl is setup correctly, because this link works fine with ssl
https://funtattoo-nl.firstfind.nl/images/26.jpg

they think it has to do with my includes configuration. My CSS and picture are linked via direct http instead of https.

I should remove my direct links. How should i do this?

Is it oke for zencart that http and https traffic end in the same folder by the way?

thanks for your help

29 Apr 2010, 6:34 PM
#9
jtheed avatar

jtheed

Zen Follower

Join Date:
Apr 2008
Posts:
356
Plugin Contributions:
2

Re: stylesheet not loading with https recently installed

roekoe:

Hello,

I've contacted my provider and this their response. They're sure that ssl is setup correctly, because this link works fine with ssl
https://funtattoo-nl.firstfind.nl/images/26.jpg

they think it has to do with my includes configuration. My CSS and picture are linked via direct http instead of https.

I should remove my direct links. How should i do this?

Is it oke for zencart that http and https traffic end in the same folder by the way?

thanks for your help

Put them all as https and that way, it will always be in a secure mode. In configure.php in the includes and admin/includes in the defines, make them all https:// There should be 2 in the includes/ configure.php and 4 in the admin/includes/configure.php

3 May 2010, 1:20 PM
#10
roekoe avatar

roekoe

New Zenner

Join Date:
Feb 2010
Posts:
38
Plugin Contributions:
0

Re: stylesheet not loading with https recently installed

JTheed:

Put them all as https and that way, it will always be in a secure mode. In configure.php in the includes and admin/includes in the defines, make them all https:// There should be 2 in the includes/ configure.php and 4 in the admin/includes/configure.php

Hello,

So my includes/configure.php should look like this:

define('HTTP_SERVER', 'https://www.funtattoo.nl');
define('HTTPS_SERVER', 'https://funtattoo-nl.firstfind.nl');

or

define('HTTPS_SERVER', 'http://www.funtattoo.nl');
define('HTTPS_SERVER', 'https://funtattoo-nl.firstfind.nl');

and my admin/includes/configure.php like this:

define('HTTP_SERVER', 'https://www.funtattoo.nl');
define('HTTPS_SERVER', 'https://funtattoo-nl.firstfind.nl');
define('HTTP_CATALOG_SERVER', 'https://www.funtattoo.nl');
define('HTTPS_CATALOG_SERVER', 'https://funtattoo-nl.firstfind.nl');

or

define('HTTPS_SERVER', 'http://www.funtattoo.nl');
define('HTTPS_SERVER', 'https://funtattoo-nl.firstfind.nl');
define('HTTPS_CATALOG_SERVER', 'http://www.funtattoo.nl');
define('HTTPS_CATALOG_SERVER', 'https://funtattoo-nl.firstfind.nl');