Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Problems with Relative URL's


g3jewelry

Recommended Posts

I've been at it all day and still no solution, so I'm reaching out to my fellow osCommerce users for help.

 

I'm setting up a new store and noticed that all of the links in my store (which are relative) use http://domainname.com instead of http://www.domainname.com. My SSL cert is dedicated to www.mydomainname.com and will not work if the "www" is not used in the address.

 

I've looked in the configure.php file, the english.php file and every where else to try and find where osCommerce is being instructed to use only the mydomainname.com part of the address.

 

Does anyone know how I can change this. I need all relative links to use www.mydomainname.com? Please, please help. Thanks.

 

Quincy

Link to comment
Share on other sites

osC gets the data for the URL in /catalog/includes/configure.php

 

In some cases, it can also get data for the URL construction in /catalog/includes/local/configure.php

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

osC gets the data for the URL in /catalog/includes/configure.php

 

In some cases, it can also get data for the URL construction in /catalog/includes/local/configure.php

 

Wow. I never saw this file: /catalog/includes/local/configure.php.

 

I'm pasting what's in the file below, but I pretty much see why the www hasn't been showing up. My other question is related to my SSL not working. I have it set to "true" in my other configure.php files, but this one says "0". Does "0" mean "false"? How can get my SSL working? Thanks for the help so far.

 

define('DIR_FS_ADMIN', $DOCUMENT_ROOT.'/admin/');

define('DIR_FS_CATALOG', $DOCUMENT_ROOT.'/catalog/');

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

define('DIR_WS_ADMIN', '/admin/');

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

define('HTTP_CATALOG_SERVER', 'http://g3jewelry.com');

define('HTTP_COOKIE_DOMAIN', 'user1.test51.psoft');

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

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

 

// define('DIR_FS_DOCUMENT_ROOT', '/hsphere/local/home/user1/user1.test51.psoft/');

 

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

 

define('DIR_FS_DOCUMENT_ROOT', '/hsphere/local/home/g3admin/g3jewelry.com/');

define('DIR_FS_LOGS', '/hsphere/local/home/g3admin/logs/g3jewelry.com');

define('ENABLE_SSL', 0);

 

I left the Database portion out for obvious reasons, plus I know it works.

 

Thanks.

Link to comment
Share on other sites

These three need to contain the "www." if you require it:

 

define('HTTP_CATALOG_SERVER', 'http://www.g3jewelry.com');
define('HTTP_SERVER', 'http://www.g3jewelry.com');
define('HTTP_SERVER', 'http://www.g3jewelry.com');

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

And if you want to turn SSL on this needs to be:

 

define('ENABLE_SSL', 1);

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

These three need to contain the "www." if you require it:

 

define('HTTP_CATALOG_SERVER', 'http://www.g3jewelry.com');
define('HTTP_SERVER', 'http://www.g3jewelry.com');
define('HTTP_SERVER', 'http://www.g3jewelry.com');

 

Ok, that worked, for the catalog, but my admin pages still don't use the www.g3jewelry.com. Not sure why, but that's not a big deal, because my catalog pages show it now. Thanks a million. What about my SSL still not working? It just seems like pages that should use the SSL aren't trying to. Is that because SSL is set to "0" in my config file? I though you could only use "True" or "False". What should i change the "0" to?

Link to comment
Share on other sites

What about my SSL still not working? It just seems like pages that should use the SSL aren't trying to. Is that because SSL is set to "0" in my config file? I though you could only use "True" or "False". What should i change the "0" to?

^My last post.

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

Ok, that worked, for the catalog, but my admin pages still don't use the www.g3jewelry.com

See if you have a /admin/includes/local/configure.php file

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

See if you have a /admin/includes/local/configure.php file

 

Got the SSL working. Now we're rolling.

 

I just checked the admin folder and I do have another configure.php file. I guess i need to update that one as well. Do I use the same info you gave me in the previous post? Also, what about the catalog/includes/configure.php and admin/includes/configure.php? Is my site not using these files at all? Sorry to keep hitting you with questions. Thanks for all thing info so far.

Link to comment
Share on other sites

The /admin/inlcudes/local/configure.php may need similar edits.

 

If you're not sure, post anything you have questions on.

 

Your site is using all the configure files so don't delete any of them...

: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

The /admin/inlcudes/local/configure.php may need similar edits.

 

If you're not sure, post anything you have questions on.

 

Your site is using all the configure files so don't delete any of them...

:blush:

 

Ok. Everything seems to be working beautifully now except for on my SSL pages, it keeps saing "This page contains secure and nonsecure items. Do you want to display the page anyway?" I've narrowed it down to one image, which is my corner graphic for the SSL cert from Comodo. I need this to show up on these pages so users know that we have a good certicate. I have the following code at the bottom of all my php pages:

 

<a href="http://www.instantssl.com" id="comodoTL">SSL</a>

<script language="JavaScript" type="text/javascript">

COT("http://www.g3jewelry.com/images/secure_site.gif", "SC2", "none");

</script>

 

Do I need to change the location of the graphic? I don't get this message on my forms outside of of the store that use SSL (ie. https://www.g3jewelry.com/emailform.php

 

Any ideas on how I can fix this? Thanks again.

Link to comment
Share on other sites

Change this code:

 

<script language="JavaScript" type="text/javascript">
COT("http://www.g3jewelry.com/images/secure_site.gif", "SC2", "none");
</script>

to

 

<script language="JavaScript" type="text/javascript">
COT("https://www.g3jewelry.com/images/secure_site.gif", "SC2", "none");
</script>

That's the "non secure" item.

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

Change this code:

 

<script language="JavaScript" type="text/javascript">
COT("http://www.g3jewelry.com/images/secure_site.gif", "SC2", "none");
</script>

to

 

<script language="JavaScript" type="text/javascript">
COT("https://www.g3jewelry.com/images/secure_site.gif", "SC2", "none");
</script>

That's the "non secure" item.

 

Awesome. Everything works now. You da man. Well, my paypal button keeps saying it can't establish a connection to the PayPal server when I try and use Paypal to check out as opposed to a credit card, but I'm sure I'll have to call Paypal on that one. I downloaded the kit they have for osCommerce and installed it as directed, but that part just doesn't seem to work.

 

Thanks again for all you help. Hopefully I won't have any other questions, but if I do, I now know how to get answers instead of spending my whole day trying to figure it out on my own.

 

Quincy

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...