Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Guest

[Contribution] Ultimate SEO URLs - by Chemo

Recommended Posts

Guest

Hi all,

On a fresh oscommerce with this contribution I also get the osc-id in the end of url.........I thought this wasn't neccesary, because the cache in the database? Correct me if i'm blond?! I read this whole thread (30 pages) and noticed I'm not the onlyone with the "problem". Changed a couple of things but still no good.......

I know it isn't a real error but I love to get details right....?! Tried the spider simulator and noticed that the spiders don't see the osc-id.

Want to see it? go to: testsite

greetings,

 

Chris

 

P.S. Great contribution, Bobby!!

Share this post


Link to post
Share on other sites

*******

****

i was just about to put up nearly an identical post,.... funny heh!

 

my oscommerce is currently on an offline testing server and i too can only get the url with the 'osc-id' attatched to the end and only when using 'cName'.....

 

i'd really like to use 'Rewrite' mode but this just takes me to a 'page not found'...

 

any help would be greatly appreiciated, i dont know if it helps but ive included the following snippets ...

my - .htaccess

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
RewriteEngine On 
# Change "folder" to your catalog directory name
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

and the 'cookies' bit from - htdocs\catalog\includes\configure.php

  define('HTTP_SERVER', 'http://localhost');
 define('HTTPS_SERVER', ''); // eg, https:
 define('ENABLE_SSL', false); 
 define('HTTP_COOKIE_DOMAIN', 'localhost');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '');

cheers all ..... larry

Share this post


Link to post
Share on other sites
Guest

JIPPIE!!

Thanks for the tip Lars!!

In configure.php instead of:

define('HTTP_COOKIE_DOMAIN', '/');

define('HTTPS_COOKIE_DOMAIN', '/');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '/');

 

I removed the slashes and the osc id is gone!!!!

latersssssssssss,

Chris

Share this post


Link to post
Share on other sites
Guest
Hi all,

On a fresh oscommerce with this contribution I also get the osc-id in the end of url.........I thought this wasn't neccesary, because the cache in the database? Correct me if i'm blond?! I read this whole thread (30 pages) and noticed I'm not the onlyone with the "problem". Changed a couple of things but still no good.......

I know it isn't a real error but I love to get details right....?! Tried the spider simulator and noticed that the spiders don't see the osc-id.

Want to see it? go to: testsite

greetings,

 

Chris

 

P.S. Great contribution, Bobby!!

If you have persistent osCsid's even after the first click then it is most likely a cookie setting. Post your cookie settings from your configure.php file and let's take a look.

 

*******

****

i was just about to put up nearly an identical post,.... funny heh!

 

my oscommerce is currently on an offline testing server and i too can only get the url with the 'osc-id' attatched to the end and only when using 'cName'.....

 

i'd really like to use 'Rewrite' mode but this just takes me to a 'page not found'...

 

any help would be greatly appreiciated, i dont know if it helps but ive included the following snippets ...

my - .htaccess

# $Id: .htaccess,v 1.3 2003/06/12 10:53:20 hpdl Exp $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
RewriteEngine On 
# Change "folder" to your catalog directory name
RewriteBase /catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

 

and the 'cookies' bit from - htdocs\catalog\includes\configure.php

  define('HTTP_SERVER', 'http://localhost');
 define('HTTPS_SERVER', ''); // eg, https:
 define('ENABLE_SSL', false); 
 define('HTTP_COOKIE_DOMAIN', 'localhost');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '');

cheers all ..... larry

Check your httpd.conf file and make sure the AllowOverride setting is either All or Options. Change the setting if it is not one of the above and restart Apache. The rewrite should work after you do this...

 

JIPPIE!!

Thanks for the tip Lars!!

In configure.php instead of:

  define('HTTP_COOKIE_DOMAIN', '/');

  define('HTTPS_COOKIE_DOMAIN', '/');

  define('HTTP_COOKIE_PATH', '/');

  define('HTTPS_COOKIE_PATH', '/');

 

I removed the slashes and the osc id is gone!!!!

latersssssssssss,

Chris

Those settings are not correct. The HTTP_COOKIE_DOMAIN should be your domain like this .yourdomain.com [ * notice the dot in front of the domain * ]. This form of the defining the cookie domain sets the cookie SCOPE to domain wide and will cover any page on your domain...not just a certain folder.

 

Bobby

Share this post


Link to post
Share on other sites
Guest

ok, changed the blanco cookie in:

define('HTTP_COOKIE_DOMAIN', 'www.ballonnenboer.nl');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', 'www.ballonnenboer.nl');

define('HTTPS_COOKIE_PATH', '');

 

and it all still works like a charm!! Thanks Bobby, when I receive the first income from a new site I'll make a donation to you so you can keep up the GOOD work!!

Share this post


Link to post
Share on other sites
Guest
ok, changed the blanco cookie in:

  define('HTTP_COOKIE_DOMAIN', 'www.ballonnenboer.nl');

  define('HTTPS_COOKIE_DOMAIN', '');

  define('HTTP_COOKIE_PATH', 'www.ballonnenboer.nl');

  define('HTTPS_COOKIE_PATH', '');

 

and it all still works like a charm!! Thanks Bobby, when I receive the first income from a new site I'll make a donation to you so you can keep up the GOOD work!!

Those settings will work but should be like this:

  define('HTTP_COOKIE_DOMAIN', '.ballonnenboer.nl');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '');

These settings have the most inclusive scope and will cover every scenario. I recommend these settings to most store owners to eliminate osCsid problems.

 

Bobby

Share this post


Link to post
Share on other sites

Thanks for your comments Chemo, it fixed my problem as well. The issue was coming from the configuration.php. Here are my settings....it works like a charm :

 

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://clubfitting.net'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', '.clubfitting.net');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '');

 

 

If people like Bobby wouldn't be with us, helping us, taking the oscommerce project forward, more than 90% of the people using the forum wouldn't be able to set up their e-commerce web site (easily).

This is why, for the second time, I'm sending a donation to Chemo for his involvement in the project, even if I don't make any money out of my website (for the time being). One shouldn't forget that part of the donation goes to the ocscommerce team, they deserve it as well !!

:rolleyes:

 

 

 

Those settings will work but should be like this:

 ?define('HTTP_COOKIE_DOMAIN', '.ballonnenboer.nl');
?define('HTTPS_COOKIE_DOMAIN', '');
?define('HTTP_COOKIE_PATH', '/');
?define('HTTPS_COOKIE_PATH', '');

These settings have the most inclusive scope and will cover every scenario.  I recommend these settings to most store owners to eliminate osCsid problems.

 

Bobby

Share this post


Link to post
Share on other sites
Guest

Patrice,

 

Thank you for the donation...100% of it will go toward the team/project. I will ensure that you get full credit.

 

Bobby

Share this post


Link to post
Share on other sites

Bobby,

 

Maybe it is time to start a sperate thread about SID as many questions are about that and the improper configuration.. Fact is most of the issues were probably there before U-SEO were installed... but this threas is getting really long and ALOT of it is not really anything to do with Ultimate SEO's?????

 

 

Chris


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites
Guest

I get problems if I have a product called the same as the category it is in.

 

E.G.

 

Cat Name: Toy Soldier

Product Name: Toy Soldier

 

When clicking on the category - it shows the default index page - click again and the correct page is shown.

 

Any ideas ?

 

TIA

Share this post


Link to post
Share on other sites
No need to disable...just run the uninstall script (make sure it is the install-seo.php file!!!) and then turn right around and install it.

 

The uninstall will remove both entries and the install will put one of them back in. As soon as you get the settings back in the database go configure it again.

 

Bobby

 

Excellent, Bobby! 30 seconds max and it was fixed. A small (unfortunantely) donation coming your way. :thumbsup:

Share this post


Link to post
Share on other sites
Guest
Bobby,

 

Maybe it is time to start a sperate thread about SID as many questions are about that and the improper configuration.. Fact is most of the issues were probably there before U-SEO were installed... but this threas is getting really long and ALOT of it is not really anything to do with Ultimate SEO's?????

Chris

What? And support the Ultimate SEO URLs contribution with this thread? That is blasphemy! :) Actually, I tend to agree...

 

I get problems if I have a product called the same as the category it is in.

 

E.G.

 

Cat Name: Toy Soldier

Product Name: Toy Soldier

 

When clicking on the category - it shows the default index page - click again and the correct page is shown.

 

Any ideas ?

 

TIA

Sure...I have a ton of ideas but which ones will apply to your case will depend on how well you can describe your problem.

 

What is your URL? Are you using cName or Rewrite? What are your relevant admin control panel settings?

 

Excellent, Bobby!  30 seconds max and it was fixed.  A small (unfortunantely) donation coming your way.  :thumbsup:

Much gratitude! I'll forward it on to the team in your name as soon as Harald gets back with me!

 

Bobby

Share this post


Link to post
Share on other sites

Hello again Bobby

 

I added new products to my website and they were displayed with the following kind of address :

http://clubfitting.net/product_info.php?cP...&products_id=99

 

As soon as I made a reset of the "SEO URLs Cache", the new products were correctly displayed :

http://clubfitting.net/snake-eyes-quick-strike-p-97.html

Is it normal ?

 

If yes, it means that we will have to reset the "SEO URLs Cache" each time we add new products ? :-"

 

 

Thanks for your time

Patrice

Share this post


Link to post
Share on other sites
Hello again Bobby

 

I added new products to my website and they were displayed with the following kind of address :

http://clubfitting.net/product_info.php?cP...&products_id=99

 

As soon as I made a reset of the "SEO URLs Cache", the new products were correctly displayed :

http://clubfitting.net/snake-eyes-quick-strike-p-97.html

Is it normal ?

 

If yes, it means that we will have to reset the "SEO URLs Cache" each time we add new products ? :-"

Thanks for your time

Patrice

 

That is normal, but you should be resetting the cache whenever you do make a change....

 

That is what step 6 is:

// Ultimate SEO URLs - by Chemo
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

might want to recheck your install...


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites
Guest
That is normal, but you should be resetting the cache whenever you do make a change....

 

That is what step 6 is:

// Ultimate SEO URLs - by Chemo
?// If the action will affect the cache entries
?if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

might want to recheck your install...

 

 

Is there a way to get it to reset on a regular basis automaticaly? as products are added and deleted all the time, every hour of each working day. :(

Share this post


Link to post
Share on other sites

Hi...

 

If you have done the install correctly, the cache should reset every time you add or edit a category and/or product in the admin.

 

:thumbsup:

Edited by toyicebear

Share this post


Link to post
Share on other sites

Hi...

 

1. check that you have uploaded the file reset_seo_cache.php to admin/includes.

 

2. check that you have added this code to categories.php in the admin folder.

 

// Ultimate SEO URLs - by Chemo
// If the action will affect the cache entries
if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

:thumbsup:

Share this post


Link to post
Share on other sites
Is there a way to get it to reset on a regular basis automaticaly? as products are added and deleted all the time, every hour of each working day. :(

As nick explained, the program will do it if you installed it right. If it is not then you should re-check the install.


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites
Guest
Is there a way to get it to reset on a regular basis automaticaly? as products are added and deleted all the time, every hour of each working day. :(

If you are updating regularly like that I assume that you are using Easy Populate? If that is the case you'll need to add that line of code to the bottom of that file to reset the cache automatically on import.

 

As has be posted, if you are entering or modifying them manually it should automatically reset the cache.

 

Bobby

Share this post


Link to post
Share on other sites
Me again,

 

Bobby I know that you fixed a problem for me earlier regarding the product links in the shopping cart not working. They work now but what seems to happen is if I view my shopping cart and then click on the product link to have another look at the product... the product gets removed from the shopping cart.

 

Kathy

 

 

Hi,

 

Just wanted to let everyone know that this problem was related to my cookie paths in configure.php. I fixed it to the suggested way:

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

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '');

 

And like magic, everything seems to work just fine.

 

There seems to be a lot of related problems with this contribution (with sids, and products, etc.) occurring because of improper cookie configurations... maybe Chemo, this might be a good thing to stick in the install instructions for any future revisions.

 

Kathy

(think I want a cookie now, hmm, not sure why)

Share this post


Link to post
Share on other sites
Hi,

 

Just wanted to let everyone know that this problem was related to my cookie paths in configure.php. I fixed it to the suggested way:

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

  define('HTTPS_COOKIE_DOMAIN', '');

  define('HTTP_COOKIE_PATH', '/');

  define('HTTPS_COOKIE_PATH', '');

 

And like magic, everything seems to work just fine.

 

There seems to be a lot of related problems with this contribution (with sids, and products, etc.) occurring because of improper cookie configurations... maybe Chemo, this might be a good thing to stick in the install instructions for any future revisions.

 

Kathy

(think I want a cookie now, hmm, not sure why)

 

 

Kathy,

I think the reality is that most of the time (if not all), the SID issue was already there- just by using the SEO contribution they are now looking at the URL.

 

Ultimate SEO's really has nothing to do with the SID's in the URL it is a matter of configuration / setup (or lack of).

 

I am not saying it is not an issue, but unfair to say it is an issue because of this contribution.

 

Chris


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites
Hi...

 

1. check that you have uploaded the file reset_seo_cache.php to admin/includes.

 

2. check that you have added this code to categories.php in the admin folder.

 

// Ultimate SEO URLs - by Chemo
// If the action will affect the cache entries
if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

:thumbsup:

 

 

Here is a tip for some of you...

 

If you want to reset cache when you delete a product or category or if you have copy attributes installed you can add confirm to the eregi and that will reset cache for those function to.

 

if ( eregi("(insert|update|setflag|confirm)", $action) ) include_once('includes/reset_seo_cache.php');


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

Thanks for your answer.

 

I don't know why but I forgot indeed to add :

// Ultimate SEO URLs - by Chemo
 // If the action will affect the cache entries
 if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

 

:-"

 

Hi...

 

1. check that you have uploaded the file reset_seo_cache.php to admin/includes.

 

2. check that you have added this code to categories.php in the admin folder.

 

// Ultimate SEO URLs - by Chemo
// If the action will affect the cache entries
if ( eregi("(insert|update|setflag)", $action) ) include_once('includes/reset_seo_cache.php');

 

:thumbsup:

Share this post


Link to post
Share on other sites
Here is a tip for some of you...

 

If you want to reset cache when you delete a product or category or if you have copy attributes installed you can add confirm to the eregi and that will reset cache for those function to.

 

if ( eregi("(insert|update|setflag|confirm)", $action) ) include_once('includes/reset_seo_cache.php');

 

Sorry forgot to add - Attributes requires the word create to be added, but it really does not affect SEO URLS (was thinking of page cache - sorry)


osC Contributions I have published.

 

Note: Some I only provided minor changes, updates or additions!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×