Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CSS not working with secure pages in IE


rchill

Recommended Posts

I'm getting an error message with IE8 saying This web page contains content that will not be delivered using a secure HTTPS connection, I'm using STS which seems to be working fine, in my index page and css there are no base hrefs or absoluted urls anywhere I've just got a link to the css as <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css"> which works fine on the non-secure pages as far as I know the configure.php is correct and it will access the secure pages except for the styling.

It's a shared SSL with hostgator

my index head looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html $htmlparams>

<head>

<!--$headcontent-->

<link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">

</head>

The configure looks like this:

<?php

define('HTTP_SERVER', 'http://allweatheruse.com');

define('HTTPS_SERVER', 'https://gator352.hostgator.com/~flair');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'allweatheruse.com');

define('HTTPS_COOKIE_DOMAIN', 'gator352.hostgator.com/~flair');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

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', 'pub/');

define('DIR_FS_CATALOG', '/home/flair/public_html/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

define('DB_SERVER', 'localhost');

define('DB_SERVER_USERNAME', '*******');

define('DB_SERVER_PASSWORD', '*******');

define('DB_DATABASE', '******');

define('USE_PCONNECT', 'false');

define('STORE_SESSIONS', 'mysql');

?>

HELP! Any ideas please

Link to comment
Share on other sites

The configure looks like this:

<?php

-----

-----

-----

-----

define('HTTPS_COOKIE_DOMAIN', 'gator352.hostgator.com/~flair');

 

HELP! Any ideas please

 

Try this:

define('HTTPS_COOKIE_DOMAIN', 'gator352.hostgator.com');

 

wink.gif

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Still not working, my brain is sizzled any other suggestions, it's going to be something obvious that I'm over looking :'(

Click the SSL Implementation Help link in my signature.

 

Looks like the store isn't recognizing that SSL in "on".

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I tried all that but i'm still getting the same problem, however if I disable sts and use the default shop it works fine on both http and https pages with no error messages, I've installed sts over a fresh install of osc and it works fine on http pages i'm just missing the styling and images from the secure pages, any ideas please?

Link to comment
Share on other sites

It's like germ said above. Did you click on the SSL Implementation Help link in germs post above? The fix should be in there.

Link to comment
Share on other sites

Still not working, my brain is sizzled any other suggestions, it's going to be something obvious that I'm over looking :'(

In /catalog/includes/application_top.php change this code:

 

  $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

 

To:

 

  $request_type = ($HTTP_HOST == 'gator352.hostgator.com') ? 'SSL' : 'NONSSL';

 

BACKUP THE FILE BEFORE YOU CHANGE IT.

 

It's not as "obvious" as you think.

 

The osC coders used the most common method of detecting if SSL is active or not.

 

Unfortunately not all servers are set-up to act like that.

:blink:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Hi Germ,

Thanks a bundle, now it links to the secure pages with no error messages, I get the padlock and https address and the button graphics I feel like I'm actually getting somewhere now, however there is just one final issue: the css still doesn't work on the secure pages (sorry)

my main template file is index.php.html the css file is awu_main.css (I've also tried duplicating this and calling it stylesheet.css with the same results) which is in the same directory

the css link is <link rel="stylesheet" type="text/css" href="$templatedir/awu_main.css">

all the image refs in the css are set out like this background-image: url(images/paperback.jpg); etc

when i click log in for example it opens the https page with the correct information and buttons but no css formatting.

All the sts templates produce the same results, but if i switch sts off and use the default shop the css works fine!? am I just not cut out for this or what?

Thanks very much for your help so far if I can just find out what I'm not doing right on this I'll have a very relaxing weekend - sorry to be such a pain.

rchill

Link to comment
Share on other sites

Hi Germ,

Thanks a bundle, now it links to the secure pages with no error messages, I get the padlock and https address and the button graphics I feel like I'm actually getting somewhere now, however there is just one final issue: the css still doesn't work on the secure pages (sorry)

my main template file is index.php.html the css file is awu_main.css (I've also tried duplicating this and calling it stylesheet.css with the same results) which is in the same directory

the css link is <link rel="stylesheet" type="text/css" href="$templatedir/awu_main.css">

all the image refs in the css are set out like this background-image: url(images/paperback.jpg); etc

when i click log in for example it opens the https page with the correct information and buttons but no css formatting.

All the sts templates produce the same results, but if i switch sts off and use the default shop the css works fine!? am I just not cut out for this or what?

Thanks very much for your help so far if I can just find out what I'm not doing right on this I'll have a very relaxing weekend - sorry to be such a pain.

rchill

The link to the stylesheet on the SSL side is currently:

 

<link rel="stylesheet" type="text/css" href="/catalog/includes/sts_templates/awu/awu_main.css">

 

I believe it needs to be this:

 

<link rel="stylesheet" type="text/css" href="includes/sts_templates/awu/awu_main.css">

 

I fact it should be that for both sides SSL and NONSSL.

 

Although I can't explain why it currently works only on one side...

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...