Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

I get the same problem when going through the cat select box.

 

http://www.ideal-handling.com/catalog/index.php?cPath=159

 

instead of

 

http://www.ideal-handling.com/catalog/powered-carts-zallys-electric-carts-c-1_158_159.html

This is even after I reset the cache for cat box.

Edited by Rochdalemark
Link to comment
Share on other sites

think i got it!

 

I changed the seo_cache.php, by changing:

-----------------------------------------------------------

# Add the defines to the output string

$cat_cache .= 'define(\'CATEGORY_NAME_' . $id . '\', \'' . $parent_name . $name . '\'); ' . "\n";

$cat_cache .= 'define(\'' . $parent_name . $name . '\', \'cPath=' . $id . '\'); ' . "\n";

# Add the category name to the container array

$cat_container[$parent_name . $name] = array('id' => $id, 'counter' => 1);

--------------------------------------------------------

to this:

----------------------------------------------------------

# Add the defines to the output string

$cat_cache .= 'define(\'CATEGORY_NAME_' . $id . '\', \'' . $name . '\'); ' . "\n";

$cat_cache .= 'define(\'' . $name . '\', \'cPath=' . $id . '\'); ' . "\n";

# Add the category name to the container array

$cat_container[$name] = array('id' => $id, 'counter' => 1);

-----------------------------------

 

Basically i just removed the $parent_name variable 3 times. It seems to be working, but Chemo could you confirm this is the correct way to remove the parent category names from the subcats? thanks!

Link to comment
Share on other sites

Hi everybody,

 

To begin, i want to congratulate you for this GREAT contrib, mister Chemo !

But, i noticed with this contribution, a problem with Category Drop Down List.

Effectly, it works but he return a link with this form : "cPath=22_33" or normally it return that : name_of_the category.html

 

So i need a little help, please :'(

 

In friends way ...

Edited by ryu007
Link to comment
Share on other sites

Good find!  How did you figure it out??

 

Bobby

 

 

When I uninstalled the SEO URL's and went back to my SEO software, it said that a redirect was hindering submission. Even though I was submitting the main page, it was showing me logoff.php. I put it all together and remembered how the Autologon Contribution worked. I tried going in to admin and turning it off, and low and behold, now my pages were spider-friendly again!

 

Thanks to all of you for your help,

Aaron

Link to comment
Share on other sites

I get the same problem when going through the cat select box.

 

http://www.ideal-handling.com/catalog/index.php?cPath=159

 

instead of

 

http://www.ideal-handling.com/catalog/powered-carts-zallys-electric-carts-c-1_158_159.html

This is even after I reset the cache for cat box.

Install the latest seo_redirect.php script here: http://www.oscommerce.com/community/contributions,2823

 

This should solve all the issues with non-SEO'd links like manufacturers and also from other contributions that do not pass the full cPath to tep_href_link()

 

think i got it!

 

< snip code >

 

Basically i just removed the $parent_name variable 3 times. It seems to be working, but Chemo could you confirm this is the correct way to remove the parent category names from the subcats? thanks!

That is absolutely correct! :)

 

Hi everybody,

 

To begin, i want to congratulate you for this GREAT contrib, mister Chemo !

But, i noticed with this contribution, a problem with Category Drop Down List.

Effectly, it works but he return a link with this form : "cPath=22_33" or normally it return that : name_of_the category.html

 

So i need a little help, please :'(

 

In friends way ...

Install the latest seo_redirect.php script here: http://www.oscommerce.com/community/contributions,2823

 

This should solve all the issues with non-SEO'd links like manufacturers and also from other contributions that do not pass the full cPath to tep_href_link()

 

Bobby

Link to comment
Share on other sites

Kathy,

 

I just tested on my dev server which is using the patch Bobby posted above in his pastebin and I am not having this problem.  You might want to look into something else.  I  know that is not an answer, but I don't think it is the SEO causing as I am unable to duplicate your issue.

 

Chris

 

 

Think I figured it out (unless it is all a fluke), but here is what I did. I read somewhere that certain shopping carts things are taken care of in application_top.php so went in there and realized that the seo urls code comments had been commented out with # instead of // (as all the other comments have the // before them) so made the switch and my problem now seems to be fixed. Does this make any sense? Or could it just be a coincidence? Will keep an eye on it and see if the problem comes back.

 

Kathy

Link to comment
Share on other sites

Disclaimer: I am an idiot.

 

Question: I forgot to run the second install per the detailed and clear instructions. No excuse. Can I add the db changes via phpmyadmin without having to back out the code changes? What section of <edit>

 

Sorry for that-I commented out the added code in catalog/includes/application_top.php, reuploaded and was able to run it. So, instead of asking for help-THANK YOU Bobby for the stellar work.

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

@bobby

 

I have installed the seo redirect beta3, but always the same error as in beta1 and beta2 for me.

 

When I call poduct url like product_info.php or cname = product not found.

 

greets,

panzz

 

Me too. I just installed the redirect and all my products give me the "Product not Found!" warning.

 

And, I'm getting the error message:

 

Warning: constant(): Couldn't find constant in /home/alaskaje/public_html/includes/application_top.php on line 292

 

 

Also-and this started as soon as I installed Ultimate seo urls v.2- every time I click a category, it changes the url but just reloads the main page... Any help?

 

I upgraded from cName pName to ultimate seo urls-apparently I did it wrong...

Edited by akmac

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

Think I figured it out (unless it is all a fluke), but here is what I did. I read somewhere that certain shopping carts things are taken care of in application_top.php so went in there and realized that the seo urls code comments had been commented out with # instead of // (as all the other comments have the // before them) so made the switch and my problem now seems to be fixed. Does this make any sense? Or could it just be a coincidence? Will keep an eye on it and see if the problem comes back.

 

Kathy

 

 

Kathy....

 

If you are sayoing all you did is change the comment tag from # to //

 

Then yes it is coincidence......

 

 

They do the same thing....

 

 

Chris

osC Contributions I have published.

 

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

Link to comment
Share on other sites

Kathy....

 

If you are sayoing all you did is change the comment tag from # to //

 

Then yes it is coincidence......

They do the same thing....

Chris

 

 

Yeah, I kinda realize that... and my problem is actually still there afterall, but seems to be with only a few products, not all of them... very strange anyway... but I have been having a few glitches lately but nothing too serious... and I am sure I will figure out something soon.

 

I regretted my last posting as soon as it went up and I figured it would sound silly, but I am not a coder or php pro by any means, so please forgive me for my ignornance... all I know is that all the strange things that have been happening have just started since I install a few different seo contributions like the seo urls and the sitemap... but it could just be a coincidence and be unrelated...

 

Kathy

Link to comment
Share on other sites

Yeah, I kinda realize that... and my problem is actually still there afterall, but seems to be with only a few products, not all of them... very strange anyway... but I have been having a few glitches lately but nothing too serious... and I am sure I will figure out something soon.

 

I regretted my last posting as soon as it went up and I figured it would sound silly, but I am not a coder or php pro by any means, so please forgive me for my ignornance... all I know is that all the strange things that have been happening have just started since I install a few different seo contributions like the seo urls and the sitemap... but it could just be a coincidence and be unrelated...

 

Kathy

 

 

So disable and/or unistall one at a time and se when it gets fixed... or roll back to your back up and reinstall one at a time and se when it breaks...

osC Contributions I have published.

 

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

Link to comment
Share on other sites

@bobby

 

I have installed the seo redirect beta3, but always the same error as in beta1 and beta2 for me.

 

When I call poduct url like product_info.php or cname = product not found.

 

greets,

panzz

I'm not sure...each store is different in its own way. Different contributions, languages, custom coding, and server configurations. I have tried to code the contribution to be as compatible as possible but this is an impossible task especially when dealing with htaccess URL rewrites.

 

I do not know how else to help you with this. Maybe if I get time next week I'll ask for some FTP credientials so I can get in there and fix the site for you. No promises though...

 

Me too.  I just installed the redirect and all my products give me the "Product not Found!" warning. 

 

And, I'm getting the error message:

 

Warning: constant(): Couldn't find constant in /home/alaskaje/public_html/includes/application_top.php on line 292

Also-and this started as soon as I installed Ultimate seo urls v.2- every time I click a category, it changes the url but just reloads the main page...  Any help?

 

I upgraded from cName pName to ultimate seo urls-apparently I did it wrong...

Did you follow the install directions or the upgrade directions? The upgrade directions were for Ultimate SEO URLs version 1.4 => 2.0 ! ! !

 

Bobby

Link to comment
Share on other sites

The upgrade directions were for Ultimate SEO URLs version 1.4 => 2.0 ! ! !

 

Bobby

 

Sheepishly: I began installing it over the cName mod-until I noticed that you were asking me to change lines of code I couldn't find...oops- at that point I installed Ultimate v 1.4, then followed the upgrade to v.2 instructions. I'll email you a link so you can see it.

Edited by akmac

Quidquid latine dictum sit, profundum viditur.

Link to comment
Share on other sites

I'm not sure...each store is different in its own way. Different contributions, languages, custom coding, and server configurations. I have tried to code the contribution to be as compatible as possible but this is an impossible task especially when dealing with htaccess URL rewrites.

 

I do not know how else to help you with this. Maybe if I get time next week I'll ask for some FTP credientials so I can get in there and fix the site for you. No promises though...

 

thanks bobby, let's work it out next week ...

 

greets,

panzz

Link to comment
Share on other sites

Hello

 

I installed Bobby's contrib and it works great, except on one point (for me) :

 

I can only get the desired path as follow :

http://clubfitting.net/snake-eyes-iron-head-p-70.html

IF and only IF, the "force cookie use" is set to TRUE (IE is set to medium : accept cookies)

The rest of the settings are :

 

Sessions

Session Directory /tmp/

Force Cookie Use True

Check SSL Session ID False

Check User Agent False

Check IP Address False

Prevent Spider Sessions True

Recreate Session True

 

Cache use cache true

Cache directory /tmp/

 

My spiders.txt is up to date

 

 

If I set the "force cookie use" to False, I obtain :

http://clubfitting.net/wedge-forg?-snake-e...240792476198c23

----> no good, isn'it

 

As explained by Chemo in one of the thread to Katy, it isn't good for customers to force cookie use....what can I do to make it work

 

 

Thanks for your help

Patrice

Link to comment
Share on other sites

Hi all,

 

I tried installing with the 2.0b Feb 7 release. I ended up with two listings of SEO URLs in the Admin Config. They both have the same added and modified date of today.

 

When I enable the second listing, I can see it is changing the urls to .html however none of the urls exist. Enabling the first listing does nothing as far as I can tell.

 

Since the second listing seems to be working, I changed to cName instead of Rewrite and it seems cName is working ok. Rewrite does not.

 

I shut it back off. What do I need to check?

 

Thanks,

Scott

Link to comment
Share on other sites

Ok, my .htaccess didn't transfer correctly. Now the urls work just fine in redirect mode.

 

Whew!!!

 

I still have double listings in the Admin -> Configure panel. How can I get rid of the first one?

 

I'm a new administrator on this site, and AFAIK there wasn't any SEO contribs installed previously. I checked to make sure SEF URLs was disabled before installing, and it said so, but maybe it had said SEO URls instead of SEF Urls? I'm confusing myself now.

 

Thanks,

Scott

Link to comment
Share on other sites

Hello

 

I installed Bobby's contrib and it works great, except on one point (for me) :

 

I can only get the desired path as follow :

http://clubfitting.net/snake-eyes-iron-head-p-70.html

IF and only IF, the "force cookie use" is set to TRUE (IE is set to medium : accept cookies)

The rest of the settings are :

 

Sessions 

Session Directory /tmp/ 

Force Cookie Use True 

Check SSL Session ID False 

Check User Agent False 

Check IP Address False 

Prevent Spider Sessions True 

Recreate Session True

 

Cache  use cache true 

Cache directory /tmp/

 

My spiders.txt is up to date

If I set the "force cookie use" to  False, I obtain :

http://clubfitting.net/wedge-forg?-snake-e...240792476198c23

----> no good, isn'it

 

As explained by Chemo in one of the thread to Katy, it isn't good for customers to force cookie use....what can I do to make it work

 

 

Thanks for your help

Patrice

 

 

Check your configuration and make sure that is correct... make sure there is no http or https or www in the cookie domain.

osC Contributions I have published.

 

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

Link to comment
Share on other sites

Ok, my .htaccess didn't transfer correctly.  Now the urls work just fine in redirect mode.

 

Whew!!!

 

I still have double listings in the Admin -> Configure panel.  How can I get rid of the first one?

 

I'm a new administrator on this site, and AFAIK there wasn't any SEO contribs installed previously.  I checked to make sure SEF URLs was disabled before installing, and it said so, but maybe it had said SEO URls instead of SEF Urls?  I'm confusing myself now.

 

Thanks,

Scott

 

 

If you are capable go in with phpmyadmin and remove one of the groups and then filter for that group in configuration and remove them...

 

If you cant do that go back to the install/uninstall page and remove them and start over....

osC Contributions I have published.

 

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

Link to comment
Share on other sites

If you are capable go in with phpmyadmin and remove one of the groups and then filter for that group in configuration and remove them...

 

If you cant do that go back to the install/uninstall page and remove them and start over....

 

I don't think I have enough sql experience to try #1 yet.

 

So for option #2, I'm thinking I should disable the module, run install-seo.php and select uninstall. Then rerun it to do the install, and turn the module back on? This sound right? It's a live store.

 

Thanks again

Link to comment
Share on other sites

Hello

 

I installed Bobby's contrib and it works great, except on one point (for me) :

 

I can only get the desired path as follow :

http://clubfitting.net/snake-eyes-iron-head-p-70.html

IF and only IF, the "force cookie use" is set to TRUE (IE is set to medium : accept cookies)

The rest of the settings are :

 

Sessions 

Session Directory /tmp/ 

Force Cookie Use True 

Check SSL Session ID False 

Check User Agent False 

Check IP Address False 

Prevent Spider Sessions True 

Recreate Session True

 

Cache  use cache true 

Cache directory /tmp/

 

My spiders.txt is up to date

If I set the "force cookie use" to  False, I obtain :

http://clubfitting.net/wedge-forg?-snake-e...240792476198c23

----> no good, isn'it

 

As explained by Chemo in one of the thread to Katy, it isn't good for customers to force cookie use....what can I do to make it work

 

 

Thanks for your help

Patrice

I would NOT use the /tmp/ directory for the cache file. You may find one day that you are have someone else's category box on your site :) Don't laugh...it has happened!

 

So, turn off the Force Cookie Use setting. Then, update your spiders.txt file. Next, change your cache directory to something else. Then, clear your cache just to be safe. Finally, check your site with my spider simulator: Chemo's Spider Simulator

 

A successful test would be like this:

 

Googlebot: no osCsid's in the URLs

Chemo's Spider: no osCsid's in the URLs

Firefox: has osCsid's in the URLs

 

If your site passes those tests it is functioning correctly.

I don't think I have enough sql experience to try #1 yet.

 

So for option #2, I'm thinking I should disable the module, run install-seo.php and select uninstall.  Then rerun it to do the install, and turn the module back on?  This sound right?  It's a live store. 

 

Thanks again

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

Link to comment
Share on other sites

Thanks for the answer Bobby

 

I installed the spiders.txt contrib, it would mean that I already had an updated spiders.txt file. Though, it doesn't still work, I keep having OscId. What could be missing in the spiders.txt file then ? (my cache is empty)

 

Thanks for your help

 

I would NOT use the /tmp/ directory for the cache file.  You may find one day that you are have someone else's category box on your site :)  Don't laugh...it has happened!

 

So, turn off the Force Cookie Use setting.  Then, update your spiders.txt file.  Next, change your cache directory to something else.  Then, clear your cache just to be safe.  Finally, check your site with my spider simulator: Chemo's Spider Simulator

 

A successful test would be like this:

 

Googlebot: no osCsid's in the URLs

Chemo's Spider: no osCsid's in the URLs

Firefox: has osCsid's in the URLs

 

If your site passes those tests it is functioning correctly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...