Zen Cart Logo
Forums / General Questions / double url in my links

double url in my links

Locked

Views: 1,503

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
9 May 2010, 2:26 PM
#1
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

double url in my links

Here is some trouble that i run into maybe for some one to read that have the same trouble.

What i had was links like this true the whole page.
http://www.abcd.com/www.abcd.com/index.php

The thing that i done wrong was this in the configure.php file

It was like this:

define('HTTP_SERVER', 'www.abcd.com');
define('HTTPS_SERVER', 'https://www.abcd.com');

Then i get double urls somehow.

i changed it into this:

define('HTTP_SERVER', 'http://www.abcd.com');
define('HTTPS_SERVER', 'https://www.abcd.com');

And the problem was fixed.

9 May 2010, 4:06 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: double url in my links

Thanks for the posting the issues involved in configuring the two configure.php files correctly and how setting them up incorrectly will cause issues in how the site runs ...

This example will allow somethings to "appear" to work and other things to fail ... this makes it hard to see the cause of the problem, initially ...

Once the two configure.php files are setup correctly, the problems will resolve ...

9 May 2010, 8:20 PM
#3
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

Re: double url in my links

Im still having problems with SSL

When im having it like this im having problems with the login. security popup error.

if ($connection == 'NONSSL') {
      $link = HTTP_SERVER;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == 'true') {
        $link = HTTPS_SERVER;
      } else {
        $link = HTTP_SERVER;
      }

When i do it like this everything is ok

if ($connection == 'NONSSL') {
      $link = HTTP[B]S[/B]_SERVER;
    } elseif ($connection == 'SSL') {
      if (ENABLE_SSL == 'true') {
        $link = HTTPS_SERVER;
      } else {
        $link = HTTP_SERVER;
      }

I have test to remove the css file with the back ground picture but that dit not work.

Somehow im thinking its in de button clicks from:
login and the search

these are shown in the source http but not https
could somebody look at my page and give me advice how to change these files if its them what makes the security popup to the way it work then?

http://www.apajo.nl

thanks greets,
TALES

10 May 2010, 2:23 AM
#4
ajeh avatar

ajeh

Oba-san

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

Re: double url in my links

Post your two configure.php files, from the server, without your username or password ...
/includes/configure.php
/admin/includes/configure.php

NOTE: if you have changed your /admin to another name, you should mask your new /admin name so it is still hidden from the world ...

10 May 2010, 8:49 AM
#5
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

Re: double url in my links

My includes:

define('HTTP_SERVER', 'http://www.apajo.nl');
define('HTTPS_SERVER', 'https://apajo-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', '/phpBB2/');

// * 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/apajo.nl/public_html/');

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

My admin includes:

* If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following:
 */
  define('HTTP_SERVER', 'http://www.apajo.nl');
  define('HTTPS_SERVER', 'https://apajo-nl.firstfind.nl');
  define('HTTP_CATALOG_SERVER', 'http://www.apajo.nl');
  define('HTTPS_CATALOG_SERVER', 'https://apajo-nl.firstfind.nl');

  // secure webserver for catalog module and/or admin areas?
  define('ENABLE_SSL_CATALOG', 'true');
  define('ENABLE_SSL_ADMIN', '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_ADMIN', '/xxxxmyrenamedadmindirxxxxx/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', '/xxxxmyrenamedadmindirxxxxx/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
  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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * 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_ADMIN', '/home/apajo.nl/public_html/xxxxmyrenamedadmindirxxxxx/');
  define('DIR_FS_CATALOG', '/home/apajo.nl/public_html/');

  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
10 May 2010, 5:23 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: double url in my links

Where are you seeing these double URLs ... I am not seeing them on the site ...

10 May 2010, 5:33 PM
#7
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

Re: double url in my links

The Double URLS has been fixed that was the problem when i did not put the http:// in front of the url. That was the first post.

Right now im having problem with SSL when im going to login and furder. This is with IE and with chrome i also see a triangle that is not good also.

When i go with IE to the login page then i get this popup message. when i click on YES on the one im getting a page with out any pictures and stylesheet.

The SSL lock is then been seen in the IE browser and then the SSL is oke. But i dont want this message to be there and that the use of this SSL is working correct.

10 May 2010, 5:49 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: double url in my links

When I do a view source on your site on a secure page I am see the:
base href

tag is referencing the non-secure site ...

This is causing the problem ...

10 May 2010, 6:00 PM
#9
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

Re: double url in my links

includes/templates/template_default/common/html_header.php

What im seeing there is this:

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />

Is this what needs to be changed?

10 May 2010, 9:37 PM
#10
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

Re: double url in my links

Ok im this far now. I have changed this:

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ); ?>" />

To this:

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTPS_SERVER . DIR_WS_CATALOG ); ?>" />

IE is working correct now. The lock of SSL is correct for that browser.

Only google chrome still has a problem and is not showing the lock. i see a triangle with !

What is chrome seeing and IE not?

10 May 2010, 9:57 PM
#11
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: double url in my links

how did you setup your SSL ? base on your configure.php your SSL is shared SSL . I have never setup shared one , but reading some thread , you need to transfer copy of your ZC files to a folder assigned by your host in your shared SSL ???

No need to modify any codes as far as i know .. :unsure:

11 May 2010, 8:42 AM
#12
tales75 avatar

tales75

New Zenner

Join Date:
Apr 2010
Posts:
13
Plugin Contributions:
0

Re: double url in my links

tony_sar:

how did you setup your SSL ? base on your configure.php your SSL is shared SSL . I have never setup shared one , but reading some thread , you need to transfer copy of your ZC files to a folder assigned by your host in your shared SSL ???

No need to modify any codes as far as i know .. :unsure:

Im still having the change in the html_header.php the change of base href with the extra HTTPS like i say in my last post. Somehow its working correct now in IE and Chrome.

What i thing by reading your post is that my host is automatic makes a copy to the shared SSL location but this takes sometime maybe??

Or what could be is that now they activate the SSL for my account. Im not shure what is the good answer but i think i leave the change in the html_header.php couse now it looks like every thing is fine/good.

Thank you all for answering and helping with my error's/problems. :clap:

Greets
TALES