Zen Cart Logo
Forums / Basic Configuration / shared ssl and links

shared ssl and links

Locked

Views: 3,080

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
8 Jul 2009, 8:19 PM
#1
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

shared ssl and links

I'm using 1.3.8a and have a problem with external link coding but don't want to post my url because in the past it has overloaded the server.

I've read Dr Byte's article about shared ssl and also about IE warnings of secure and non-secure items but I either don't understand how to do this or hope someone knows of a work around.

I guess my question is this: IS IT POSSIBLE TO CHANGE THE URL IN THE CONFIG FILE TO REFLECT THAT THE STORE IS IN A FOLDER WITHIN THE SITE AND BE ABLE TO GET THE SSL PAGES TO RESPECT THE RELATIVE URLS IN THE HEADERS DROP DOWN MENU TO PAGES OUTSIDE OF THAT FOLDER...and how?

As the code shows below the url to our store is in a subfolder. My header and drop down menu at the shop works beautifully...except the hardcoded urls seem to be triggering the dreaded ie browser warnig that there are secure and non secure items. When i use relative links they take on the https and trigger the ie warning and page doesn't load properly. Might a solution be to re-write the path to the store in the configure file? Any help appreciated.

// 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://mysite.com');
  define('HTTPS_SERVER', 'https://www.ssl.com/username');

  // 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', '/Shop/');
  define('DIR_WS_HTTPS_CATALOG', '/Shop/');

  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', 'D:/Inetpub/username/Shop/');

  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/');
8 Jul 2009, 9:29 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: shared ssl and links

Based on your example ...

1 if the secure certificate uses www then you need www on all URLs

2 if your Zen Cart runs in a subdirectory, such as /fred then use /fred and not /Fred ... no one remembers to uppercase anything in an URL ...

3 use FireFox and click the broken lock and look at the Media tab to see if something not SSL is being called on secure pages ...

4 check if you have calls to other servers that are not SSL on SSL pages ...

5 if this only happens on submit buttons and not on links this is due to the change from secure to non-secure and either you need to customize the code for this or live with it for now, this is being addressed for a future release that should eliminate this problem ... :smile:

Without actually seeing your site ... I can only guess at any other issue causing this ...

9 Jul 2009, 2:59 PM
#3
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

Ajah, thanks. I will pm my url if you have a chance to take a look.

The zen article linked above states the ie warning is due to hard coded links.

My css menu along the top of my store that links to files outside of the store file have been hardcoded like this or they don't work on secure pages:

<a href="http://www.mysite.net/Articles/index.html">ARTICLES</a>

When I write them like this:

<a href="/Articles/index.html">ARTICLES</a>

they work thougout the store on the non-secure pages but on the secure pages zencart puts the ssl prefix like this which leads to nowhere:

https://www###.ssl.com/Articles/index.html

I am somewhat familiar with the Apple template drop down menu and am wondering if coding my menu in such a way as it does the links is what I am in for to make this work without triggering the ie warning - or would that work at all..I don't understand the priciples governing this, obviously.

I don't use easy pages because our site is ten years old and has hundreds of pages outside the store that i've labored over to update over the years so that they validate. I'd never find the time.

10 Jul 2009, 3:59 AM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: shared ssl and links

And if you wrote them like this:

<a href="../Articles/index.html">ARTICLES</a>

10 Jul 2009, 12:35 PM
#5
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

Thanks Linda...then it does this:

https://www##.ssl.com/username/Articles/index.html
10 Jul 2009, 3:42 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: shared ssl and links

Do you actually have two headers for when you are in your shop and when you are not in your shop? Or is this a shared header?

10 Jul 2009, 8:44 PM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: shared ssl and links

Have you thought about getting your own cert? I started out with shared SSL (five years ago) and it was shaky even then. Ditched it after 3 months... Customers also like to see your full URL in a certificate - then there can be no doubt about the site. So there is a marketing advantage. SSL certs are now very cheap (though you do get what you pay for) but I'll bet a shared cert in most cases is one of the "el-cheapo" varieties anyway...

10 Jul 2009, 9:40 PM
#8
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

they are separate. I made a template for the articles portion of the site that has the dropdown on each page drawing from its own css. The shop header was designed to look like it. I edited tpl_header.php and added the css at the bottom of the zen style sheet for the shop.

Is this indeed a shared ssl issue?

11 Jul 2009, 4:05 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: shared ssl and links

The problem then is the two headers while they look the same ... they actually use different links to work ...

In the php side of things, the store, you can build relative links based on the current store ...

In the other side, the root, you can build relative links but now you are relative to the root ...

More or less you cannot use the same code in both places ...

13 Jul 2009, 1:01 PM
#10
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

Thans for your attention, Linda....I did not use the same code...I re worked it specific to zencart...i thought.

What I don't get is how to make relative links to the rest of the site in zencart on the secure pages?

...and is a shared certificate the issue here?

13 Jul 2009, 1:47 PM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: shared ssl and links

The relative links would be set one way in your Zen Cart header and another way in your root header ...

You are at different levels of the directory tree and what works in one does not work in another ...

You have to look at each header separately ...

The Zen Cart shop header could probably use:

<a href="/Articles/index.html">ARTICLES</a>

That takes you to the root, then looks for the directory /Articles and then runs the index.html in it ...

13 Jul 2009, 4:31 PM
#12
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

It does that on the unsecured pages in zencart but not on the secured. Am I missing something obvious?

13 Jul 2009, 8:08 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: shared ssl and links

Do you have 1 directory for everything or do you have a separate directory for secure files?

13 Jul 2009, 8:30 PM
#14
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

I'm not sure what you mean...i think one directory for everything. The default set up is zen's...i only changed the tpl_header file

22 Jul 2009, 8:29 PM
#15
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

Can anyone help me figure this out? I don't believe my original version 1.3.0.2 worked this way. I'm thinking that the links out from the secure pages are somehow not accessing the correct code in the configure file. I'm sorry I'm not brainier about this but if zencart is for everyone, even me, then please help. I think it is not going to the top of my webspace. have I done this incorrectly? If the https_catalog is /shop/ then why is the ssl info going in front of the relative links instead of the url?

// 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.mysite.com);
  define('HTTPS_SERVER', 'https://www##.ssldomain.com/username');

  // 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', '/shop/');
  define('DIR_WS_HTTPS_CATALOG', '/shop/');
22 Jul 2009, 8:36 PM
#16
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: shared ssl and links

I'm trying to find the right way to ask this:

Why is the ssl/username of my shared certificate going in front of my relative links from my secure pages?