Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Ultimate SEO URLs - by Chemo


Guest

Recommended Posts

Paul,

Wish that did help. It's right after uploading the files that the error occurs. It's not even possible to call the install-seo.php file due to the error.

 

One thought, Bobby: I did not install the version for caches before. Could that be the issue? Is the non-cache version trying to call something that doesn't exist?

 

Also, I too am seeing the spider test results with session IDs. Here's an example of a spider tool.  Spider Tool If you can find a way to get rid of the extra characters, please let me know! Otherwise I love this contrib.

 

Susan

Aspiring Arts

 

Sorry about that terse and incomplete "help" of mine.

 

I was speaking from the way I did the upgrade (out of order). And I had problems, so I assumed that when everything was done in order that all would be well.

 

What I did to solve my mistakes was to comment out that line that Bobby mentioned in the application_top.php file and all worked fine through the db un-installs and the re-installs. Then I removed the comment. And tried again.

 

Again, sorry about that.

 

Paul

Link to comment
Share on other sites

  • Replies 1.9k
  • Created
  • Last Reply

Top Posters In This Topic

Luckily, I have been creating my own search engine spider and search engine (to be released as osC Seach Engine Spider) and are far enough along to actually modify it slightly to check whether this was indeed a valid concern.

 

Good grief man, what don't you do?!

 

:blink:

 

 

Your work is greatly appreciated!

 

Wayne

Edited by sl1200mk2
Link to comment
Share on other sites

Chemo,

 

The 2.0 version is working well now but still not for the categories which returns me the message:

Warning: in_array(): Wrong datatype for second argument in /home/pc/public_html/catalog/includes/boxes/categories.php on line 41

 

After i updated something like a product or category in the admin section.

 

any idea ?

 

tks

Chayenne

Link to comment
Share on other sites

Hi Chemo!!!

 

I intend to use easypopulate as I have too much products to enter. Do you think it works with the 2.0 version?

 

Thanks in advance!

 

Not a problem at all. Well, maybe one slight one. Easypopulate won't update the Se0_cache db. But, here's the solution.

 

You have to add a line at the bottom of the easypopulate.php file.

 

replace

require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

with this

require('includes/reset_seo_cache.php');
require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Hi, Bobby (and the gang)...

 

Question #1:

 

Well, I read through the past 15 pages, after installing the contribution. Right now, I've got things looking like they're on the right track. But like a few others before me, I've only got it working in cName mode and not in Rewrite mode. I feel a bit dumb, as two other people had a similar problem. All afternoon, I tried playing with all the changes as put forth over the past 15 pages - but no luck. From what I can surmise, it's a .htaccess problem, and I haven't a clue.

 

What happens is that in Rewrite mode, I get the 404 errors for the categories, that everyone a few earlier people have gotten.

 

Here's the URL:

 

http://www.gameoeuvre.com/

 

which then redirects you to the front page of the catalog:

 

http://www.gameoeuvre.com/Thoomp/catalog/index.php

 

There's an .htaccess that's in /Thoomp/catalog/ - but I tried changing the folder settings to a bunch of different options (/htdocs/ , /htdocs/Thoomp/, /htdocs/Thoomp/catalog/, and few other permutations) as well as trying to put a copy of the .htdocs file higher up in the directory.

 

I'm wondering if there's something that I might need to reset in the httpd.conf file for the webserver. I'm running OSX on the Mac, which is Apache server.

 

What does my .htaccess file look like (which is in the catalog folder at present)? Apologies in advance for the relatively long post of code...

 

********************************************************************************

******

 

# $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

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

# AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

#<IfModule mod_php4.c>

# php_value session.use_trans_sid 0

# php_value register_globals 1

#</IfModule>

 

RewriteEngine On

# Change "folder" to your catalog directory name

RewriteBase /htdocs/Thoomp/catalog/

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

 

Options +FollowSymLinks

 

********************************************************************************

******

 

 

<Sigh!>

 

 

Ok, question #2:

 

For a long time now (and currently), access to my website has been cloaked with a redirect with frames. Meaning, if you go to "http://www.thoomp.com" , you are redirected in a 100% frame to "http://www.gameoeuvre.com".

 

MSN has spidered my site a bit with regards to the word "Thoomp", despite the cloaking. However, I've fallen off the map pretty much with Google. Is the cloaking that I've had in place been screwing up my being spidered correctly?

 

Thanks so much in advance!

 

- Seth <>

Link to comment
Share on other sites

Hi Seth,

 

Re Question #1,

 

Do you have the item in Administration:SEO URLs:Choose URL Type changed to Rewrite.? And I would change this line (RewriteBase /htdocs/Thoomp/catalog/) in the .htaccess to (RewriteBase /Thoomp/catalog/) .

 

If that doesn't work then maybe you need to post your .htaccess file from the root directory.

 

Pal

Link to comment
Share on other sites

Susan,

If you want to test your setup I have the beta tool available online here: Google, Chemo's Spider, and Firefox user agent simulator  You can input your URL and choose the user agent of your choice...then hit submit.  It presents lots of data but the important info is whether or not the osCsid's are appended to the URL's.  You can choose the Firefox (normal customer) user agent option and it should append the osCsid's like normal.  Then, choose the Google user agent option and it SHOULD NOT append the osCsid's.

 

I have tested all of my client setups and found zero problems.  If you encounter an error it is due to your setup and not my contribution.

Bobby, thanks so much for this tool! It returned SID-less results for the Google and Spider searches. One oddity was that all the links on the Firefox simulator had SIDs appended, whereas that doesn't happen in real life, either in a browser or in my web counter results.

 

Maybe we both need some sleep because the tone in your post seems a bit unappreciative of the free contribution.  Remember, I have spent well over 100 hours of my personal time developing this for you free of charge and with less than $40 in donations.  Further, I spend countless hours on this forum supporting my contributions (and generally anyone with osC support issues).  Go look at 90% of the other contributions and see if the authors give my level of support.  I have answered every post in all my support threads usually within minutes or hours...1 day at the latest. 

 

If you don't want to "suffer" through this bug spree uninstall my contribution and have a Coke and a smile. 

Bobby, I can see now how this could be very offensive, and I really didn't mean it that way. It was meant lightly, that you are far too busy working on the contribs to look into the spider thing, not that you had lots of bugs!

 

The suggestion to add to the install instructions was more because the tone of your and Paul's replies suggested that I didn't follow instructions, and that I had somehow screwed something up from my own stupidity. I was just trying to say that there had been no mention of any need to uninstall the earlier version previously, and I was a little hurt by the tone of the responses that suggested I should have known better. I'm one of the contribution-users who busts her butt to try to solve problems BEFORE posting questions on the board. If you look back, you'll also see that I tried to offer ideas of what might be causing the problem, rather than just expecting someone else to fix it for me.

For the rest of the store owners that know I support my work and will get all the issues resolved (which at this point is mainly upgrade errors from unexperienced webmasters) sit tight and let me create a separate upgrade installation file to make it a step by step process.  I agree that it could be more spelled out and would make upgrade easier...but creating free contributions in between trying to feed my family is a bit more difficult than it sounds.

I know this. I'm one of those store owners, and I appreciate it so much! You're really unique in your dedication. But we were both tired and, it seems, somewhat easily offended. Can we put it behind us?

 

Susan

Link to comment
Share on other sites

Susan,

 

Well put. And I don't know if you read my lop-sided apology earlier. But, just wanted you to know that I didn't mean that post to come out like you were stupid or anything. I just posted to quickly and too short. Sorry.

 

And I was going to suggest the same thing that you did. But, you beat me to it. :D

 

Paul

Link to comment
Share on other sites

>> Re Question #1,

>> Do you have the item in Administration:SEO URLs:Choose URL Type changed to Rewrite.?

 

Definitely - as that is when it breaks down.

 

>> And I would change this line (RewriteBase /htdocs/Thoomp/catalog/) in the .htaccess to (RewriteBase /Thoomp/catalog/) .

 

Changed it, and it didn't work.

 

>> If that doesn't work then maybe you need to post your .htaccess file from the root directory.

 

Hmmm...again - it sounds like a major .htaccess file problem, as there's none in the root directory. Any other thoughts?

 

Totally confused and many thanks in advance once again.

 

- Seth <>

Link to comment
Share on other sites

Not a problem at all. Well, maybe one slight one. Easypopulate won't update the Se0_cache db.  But, here's the solution.

 

You have to add a line at the bottom of the easypopulate.php file.

 

replace

require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

with this

require('includes/reset_seo_cache.php');
require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Thanks for you reply Fourbit! :thumbsup:

OSC2.2

Link to comment
Share on other sites

Well put. And I don't know if you read my lop-sided apology earlier. But, just wanted you to know that I didn't mean that post to come out like you were stupid or anything. I just posted to quickly and too short. Sorry.

Paul

 

Paul, I did read it, and thank you for posting it. Just was posting to Chemo what set me off a bit. I'm really glad for this contribution and want to get it working right.

 

Susan

Link to comment
Share on other sites

Chemo,

 

The 2.0 version is working well now but still not for the categories which returns me the message:

Warning: in_array(): Wrong datatype for second argument in /home/pc/public_html/catalog/includes/boxes/categories.php on line 41

 

After i updated something like a product or category in the admin section.

 

any idea ?

 

tks

Chayenne

On or around line 41 you should see code that looks like this:

in_array($counter, $cPath_array)

....change it to this:

@in_array($counter, $cPath_array)

This tells PHP to suppress any errors associated with that function and keep running.

Hi, Bobby (and the gang)...

 

<snip htaccess file>

 

<Sigh!>

Ok, question #2:

 

For a long time now (and currently), access to my website has been cloaked with a redirect with frames.  Meaning, if you go to "http://www.thoomp.com" , you are redirected in a 100% frame to "http://www.gameoeuvre.com".

 

MSN has spidered my site a bit with regards to the word "Thoomp", despite the cloaking.  However, I've fallen off the map pretty much with Google.  Is the cloaking that I've had in place been screwing up my being spidered correctly?

 

Thanks so much in advance!

 

- Seth <>

Try this:

Options +FollowSymLinks
RewriteEngine On
# Change "folder" to your catalog directory name
RewriteBase /Thoomp/catalog/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

Notice the change is removal of the htdocs which should not be there...also, the rest of the non-relevant portions were removed but should still be there. Just use the portion above to replace the bottom part of your file.

...

Can we put it behind us?

 

Susan

Susan,

 

All apologies...times are tough and it seems my thick skin is getting more thin everyday (as well as my hair!).

 

Bobby

Link to comment
Share on other sites

Sorry Chemo to disturb you another time but I meet a new problem. I have some articles that start like this :

 

L'?conomie

 

And with your contribution installed, I have an error on the product_info page. That's the ' that brings me such error.

 

What can I do ? First I've tried to enter the products like this :

 

L`?conomie

 

But when a customer search for the original title he is unable to find the appropriate product.

 

Could you bring me some help on this?

 

Regards!

Edited by mujina

OSC2.2

Link to comment
Share on other sites

Hi Bobby,

 

Still getting 404 errors with Rewrite. Copied the .htaccess file to the catalog director and to root, with your revised settings. Still doesn't work.

 

Any possibility that my httpd.conf is not set correctly, so that the RewriteEngine isn't allowed to work?

 

Again, thanks in advance!

 

- Seth <>

 

www.thoomp.com

Link to comment
Share on other sites

Hi Cheemo,

 

For one ..great contribution.

 

I feel a bit silly having problems with this as everyone else has managed to install without a problem (or so it seems).

 

Here is what I end up with.

 

The first time i open the browser and logon to the site the urls do show up as..

 

 

mydomain.com/dev/-c-36.html and it navigates fine to the appropriate directory.

 

After that I run into two problems.

 

1) Why isnt the category name/product name included in the path

(i have configured as "rewrite")

 

2) Following that first, load, any other link I click on has the old path

dev/index.php?cPath=37

 

 

I'm really not sure where to look for the cause of this problem so any help would be appreciated.

 

 

p.s. When I installed - I was a bit confused, I have the osC base "Cache feature" on my cart - but I'm not sure if thats the one you referred to installation step 1b - so I used method 1a.

 

 

Thanks alot

 

Mark

Link to comment
Share on other sites

Hi

I am relatively new to this and need some help with settings, what i am unsure of is the "prevent spider sessions". I need my site to work well with the search engines and note that some alterations/upgrades are available. The www.hiveuk.co.uk site has been running since November and is starting to get picked up by the search engines but i have seen some os site with a more regular page desciption rather than all the jumbled up numbers and letters as the url and think that may be a benefit if i could add it onto my site. Any help would be very much appreciated. To save others reading your replies you can send them direct to me at [email protected].

Thanks

Darren

Link to comment
Share on other sites

Bobby, phew, I'm so glad we're through that! :D

 

Do you mind if I ask another quick question, this time on the install instructions? I'm in the middle of upgrading from 1.4 to 2.0, but I'm stuck on Step 4. Does installing the new cache class count as having Page Cache installed? Is Page Cache the cache function available through the admin interface, or is it a separate contribution? I'll proceed on the assumption that I don't have page cache installed, but a little clarification will help me a lot!

 

Many thanks,

Susan

Aspiring Arts

Link to comment
Share on other sites

Another question on instructions, Step 6: I went to update the code. However, between

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

and

//SEO URLS
 if ( eregi('(update)', $action) ) include('includes/reset_seo_cache.php');

in the old code, you had me put

  if (tep_not_null($action)) {

earlier. Should I leave that code in there now before the new code or not?

 

Thanks!

Susan

Link to comment
Share on other sites

Bobby, phew, I'm so glad we're through that! :D

 

Do you mind if I ask another quick question, this time on the install instructions? I'm in the middle of upgrading from 1.4 to 2.0, but I'm stuck on Step 4. Does installing the new cache class count as having Page Cache installed? Is Page Cache the cache function available through the admin interface, or is it a separate contribution? I'll proceed on the assumption that I don't have page cache installed, but a little clarification will help me a lot!

 

Many thanks,

Susan

Aspiring Arts

 

 

Susan,

 

No, Page Cache is a seperate contribution all together. If you did not install it then use step 4 (1a) .

 

Chris

osC Contributions I have published.

 

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

Link to comment
Share on other sites

Another question on instructions, Step 6: I went to update the code. However, between

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

and

//SEO URLS
 if ( eregi('(update)', $action) ) include('includes/reset_seo_cache.php');

in the old code, you had me put

  if (tep_not_null($action)) {

earlier. Should I leave that code in there now before the new code or not?

 

Thanks!

Susan

 

You can replace it - (unless you have something funky going on)...

 

Should looks like this when done (the if (tep_not_null($action)) {) should be there already...:

 

....
require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
 
  // 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');
 

 if (tep_not_null($action)) {
   switch ($action) {
     case 'setflag':
       if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) {
         if (isset($HTTP_GET_VARS['pID'])) {
           tep_set_product_status($HTTP_GET_VARS['pID'], $HTTP_GET_VARS['flag']);
         }
....

osC Contributions I have published.

 

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

Link to comment
Share on other sites

Server info

Linux

MySQL 4.3.10

4.3.10 (Zend: 1.3.0)

Apache 1.3.33 (Unix)

 

Click here for the Catalog with Issue.

 

Hey Chemo,

Im encountering an error message after I install it.

 

By the way, your contribs making me drooling to use...

 

My PHP skills are like that of a chimpanzee so I am nearly handicapped when it comes to finding my way out of problems encountered once I install contributions, and I am certain I have made a silly mistake.

 

I installed the latest Ultimate SEO contribution as the instructions specified.

 

Then I uploaded all the contribution files to the respective directories as directed in Step 1.

 

Next I installed to my /catalog/ directory install-seo.php and install-cache.php and executed the automatic installers one at a time ( Step 2).

I than added and overwrote the lines of codes in teh appropriate files as directed in Steps 3-8.

 

I then when to my admin panel and under Admin/Configuration/ I did not notice any new features. So then i opened up my oscommerce catalog in my web browser located HERE, and noticed the following message:

 

 

1146 - Table 'censored_osc1.cache' doesn't exist

 

DELETE FROM cache WHERE cache_expires <= '2005-02-04 06:43:18'

 

[TEP STOP]

 

Any ideas?

 

From what I can tell, It appears as if something prevented install-cache.php from creating the cache table in my osc_1 database. Since I use SSL, is it likely that the SSL interfered with the installation of cache tables?

 

Your help is appreciated.

PS: Is there a way for me to manually create those two tables (install-cache.php) and (install-seo.php) other than though the two auto-nstallers you provided? As of now I am locked out and cant seem to open them up again.

jcisar

Edited by jcisar
Link to comment
Share on other sites

You are missing part of this mods code.

 

 if

 

Right arter this line

 // End Wishlist 2.0.1 Modification

 

I think. ;)

 

Paul

 

 

 

Thanks for the help with that file. The store is back to operating now. Unfortunately nothing is any different. Product info pages still have the same URL's and I have made the settings in admin. Any advice?

Link to comment
Share on other sites

John,

 

Use this to manually create the table using phpMyAdmin.

 

CREATE TABLE `cache` (

`cache_id` varchar(32) NOT NULL default '',

`cache_language_id` tinyint(1) NOT NULL default '0',

`cache_name` varchar(255) NOT NULL default '',

`cache_data` mediumtext NOT NULL,

`cache_global` tinyint(1) NOT NULL default '1',

`cache_gzip` tinyint(1) NOT NULL default '1',

`cache_method` varchar(20) NOT NULL default 'RETURN',

`cache_date` datetime NOT NULL default '0000-00-00 00:00:00',

`cache_expires` datetime NOT NULL default '0000-00-00 00:00:00',

PRIMARY KEY (`cache_id`,`cache_language_id`),

KEY `cache_id` (`cache_id`),

KEY `cache_language_id` (`cache_language_id`),

KEY `cache_global` (`cache_global`)

) TYPE=MyISAM;

 

Regards,

EricK

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...