Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * - 4 votes

[Contribution] SEO-G


1097 replies to this topic

#1 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 21 April 2007, 23:47

SEO-G provides automatic generation of URLs with your osCommerce store. Using multiple configuration options to generate a clear hierarchical structure of your store's entities, this module can significantly boost your marketing and SEO campaign.

Using osCommerce the no.1 e-commerce engine available today, as the base framework, SEO-G can utilize the database tables and generate the most comprehensive and spider-friendly URLs. Links can be generated at the same level as your store using configurable separation characters or emulate a multi-level directory structure.

SEO-G represents a set of classes around a special framework that can process the database tables, generate meaningful names which can be further customized and finally create spider-friendly URLs.

The module provides a set of configurable scripts on the osC Admin end, where the store owner can configure types, handlers, set names for various entities (eg: products,categories,articles,topics) as well as monitor the generated urls. In addition the framework is designed to easily support custom classes.

On the catalog end, the operation of SEO-G is fairly simple, yet extremely effective. It relies on a redirect method via .htaccess where a single script handles every URL conversion/request. Once an SEO-G URL is detected the system translates it to the original osCommerce URL. When installed this contribution generates spider-friendly links for all the store's pages. SEO-G links are generated progressively and no database identifiers are necessary within the links.

Contribution Link will be posted shortly as it has to be manually approved

Edited by enigma1, 21 April 2007, 23:50.


#2 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 22 April 2007, 16:07

I re-uploaded the package removing couple of the example images that were setting up the archive size to over 300K
Apologies if this may cause a duplicate in the future but if so, I will inform the forum moderator.

http://www.oscommerce.com/community/contributions,5080

#3 hansmignon

  • Community Member
  • 57 posts
  • Real Name:hans mingnon

Posted 23 April 2007, 07:36

Dear,

I Use already Ultimate SEO URLs Contribution.

Is this an add on ?

Can you use it with this this contribution ?

thx,

Hans

#4 drs101

  • Community Member
  • 60 posts
  • Real Name:danny

Posted 23 April 2007, 11:05

ok this is a very versatile mod, with ultimate seo urls you cant change the page titles or category titles to anyhing you want like you can with this one, great mod Mark, my hat off to you.

only one prolem i have is that with STS 4.3 i have to turn the template off for product info, product_info.php, everything else works great. any ideas?

thanks again
Dan

#5 drs101

  • Community Member
  • 60 posts
  • Real Name:danny

Posted 23 April 2007, 14:10

View Postdrs101, on Apr 23 2007, 12:05 PM, said:

ok this is a very versatile mod, with ultimate seo urls you cant change the page titles or category titles to anyhing you want like you can with this one, great mod Mark, my hat off to you.

only one prolem i have is that with STS 4.3 i have to turn the template off for product info, product_info.php, everything else works great. any ideas?

thanks again
Dan

one more problem i have found, if i call a .html page tht does not exist i do not get an error page i get /cookie_usage.php
if its .php or .htm then i get an error page as normal, is there a solution to this?

cheers
Dan

#6 FreeLancer

  • Community Member
  • 12 posts
  • Real Name:FreeLancer

Posted 23 April 2007, 14:10

Warning: Invalid argument supplied for foreach() in z:\home\test\www\admin\includes\classes\seo_products.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at z:\home\test\www\admin\includes\classes\seo_products.php:108) in z:\home\test\www\admin\includes\functions\general.php on line 22

#7 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 14:12

View Postdrs101, on Apr 23 2007, 06:05 AM, said:

ok this is a very versatile mod, with ultimate seo urls you cant change the page titles or category titles to anyhing you want like you can with this one, great mod Mark, my hat off to you.

only one prolem i have is that with STS 4.3 i have to turn the template off for product info, product_info.php, everything else works great. any ideas?

thanks again
Dan
Open your catalog\root.php locate this code:
		$HTTP_GET_VARS[$array_equal[0]] = $array_equal[1];
right below it add:
		$_GET[$array_equal[0]] = $array_equal[1];
Initially I only setup the $HTTP_GET_VARS array and from what I see, some contributions may also use the $_GET. So with this addition it should set both arrays. Hanen't tried it here with the STS but checked the code.

#8 drs101

  • Community Member
  • 60 posts
  • Real Name:danny

Posted 23 April 2007, 14:16

View Postenigma1, on Apr 23 2007, 03:12 PM, said:

Open your catalog\root.php locate this code:
		$HTTP_GET_VARS[$array_equal[0]] = $array_equal[1];
right below it add:
		$_GET[$array_equal[0]] = $array_equal[1];
Initially I only setup the $HTTP_GET_VARS array and from what I see, some contributions may also use the $_GET. So with this addition it should set both arrays. Hanen't tried it here with the STS but checked the code.

ok thats great thanks again

Dan

#9 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 14:23

View Postdrs101, on Apr 23 2007, 09:10 AM, said:

one more problem i have found, if i call a .html page tht does not exist i do not get an error page i get /cookie_usage.php
if its .php or .htm then i get an error page as normal, is there a solution to this?

cheers
Dan
the default .htaccess rule handles a single extension. So which one you're using? if you're using htm, then the htm pages will be generated and filtered. Other pages like .html will simply pass through. root.php will not handle them, it will not be invoked at all.

#10 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 14:24

View Postdrs101, on Apr 23 2007, 09:16 AM, said:

ok thats great thanks again

Dan
Ok, but can you please tell me if this mod worked with your configuration? I need to confirm it and include it with the next version.

thanks.

#11 drs101

  • Community Member
  • 60 posts
  • Real Name:danny

Posted 23 April 2007, 14:29

View Postenigma1, on Apr 23 2007, 03:24 PM, said:

Ok, but can you please tell me if this mod worked with your configuration? I need to confirm it and include it with the next version.

thanks.

ok that worked for STS and all the templates work as they should, i am using .html

Dan

#12 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 14:32

View PostFreeLancer, on Apr 23 2007, 09:10 AM, said:

Warning: Invalid argument supplied for foreach() in z:\home\test\www\admin\includes\classes\seo_products.php on line 108

Warning: Cannot modify header information - headers already sent by (output started at z:\home\test\www\admin\includes\classes\seo_products.php:108) in z:\home\test\www\admin\includes\functions\general.php on line 22

Make sure you tick the entries to update (using the checkboxes on the left) before you press the update or delete buttons. I will improve the error handling for this.

#13 FreeLancer

  • Community Member
  • 12 posts
  • Real Name:FreeLancer

Posted 23 April 2007, 14:36

View Postenigma1, on Apr 23 2007, 02:32 PM, said:

Make sure you tick the entries to update (using the checkboxes on the left) before you press the update or delete buttons. I will improve the error handling for this.
Ok! )

#14 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 15:16

View Postdrs101, on Apr 23 2007, 09:29 AM, said:

ok that worked for STS and all the templates work as they should, i am using .html

Dan
ok so the .html is the default extension SEO-G uses. Now the page you're trying to invoke is .htm right? In that case it will not be handled by this module. Because you specify .html only. So the .htaccess rule will only process the .html pages.

Otherwise give me the exact steps to replicate the problem.

#15 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 15:23

View Posthansmignon, on Apr 23 2007, 02:36 AM, said:

Dear,

I Use already Ultimate SEO URLs Contribution.

Is this an add on ?

Can you use it with this this contribution ?

thx,

Hans
No it is not an add-on, it is a separate module that handles urls. You should not use both.

#16 drs101

  • Community Member
  • 60 posts
  • Real Name:danny

Posted 23 April 2007, 15:49

View Postenigma1, on Apr 23 2007, 04:16 PM, said:

ok so the .html is the default extension SEO-G uses. Now the page you're trying to invoke is .htm right? In that case it will not be handled by this module. Because you specify .html only. So the .htaccess rule will only process the .html pages.

Otherwise give me the exact steps to replicate the problem.

no when i try to invoke a page .html that isnt there i should get a 404 error, instead i get taken to /cookie_usage.php.
when i try to invoke a page .htm that isnt there i do get a 404 error.

hope thats clearer

Dan

#17 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 16:40

ok I see, If you want to set a 404 header instead of the default 301 redirect, there are several ways. In every case setup the configuration header to 404 instead of 301.

One way is in the root.php you comment out this line
header('Location: ' . $g_relpath . SEO_DEFAULT_ERROR_REDIRECT);
so basically the root.php will be terminated if a 404 error is set.

Another way more elegant is to write a 404 error php script, In which case you do the following mods:
1. In the root.php comment out this line.
header('Location: ' . $g_relpath . SEO_DEFAULT_ERROR_REDIRECT);
then add below it:
	$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'] = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = SEO_DEFAULT_ERROR_REDIRECT;
	$g_script = basename($PHP_SELF);
	$g_seo_flag = true;
	require(SEO_DEFAULT_ERROR_REDIRECT);

2. In the osc configuration for SEO-G set the SEO-G redirect to the name of the file you wrote.

To test it you could set it to privacy.php or shipping.php existing pages. So that page will then come up on 404.

I think however the default redirection with 301 will be more appropriate. If say you deleted a product or a category and the link is no longer available (because you re-set all the links) you could use the 301 redirect to your site map for instance. And depends if you know the search engine internals (ie do they prefer a 404 or a 301 is better?).

#18 drs101

  • Community Member
  • 60 posts
  • Real Name:danny

Posted 23 April 2007, 17:03

View Postenigma1, on Apr 23 2007, 05:40 PM, said:

ok I see, If you want to set a 404 header instead of the default 301 redirect, there are several ways. In every case setup the configuration header to 404 instead of 301.

One way is in the root.php you comment out this line
header('Location: ' . $g_relpath . SEO_DEFAULT_ERROR_REDIRECT);
so basically the root.php will be terminated if a 404 error is set.

Another way more elegant is to write a 404 error php script, In which case you do the following mods:
1. In the root.php comment out this line.
header('Location: ' . $g_relpath . SEO_DEFAULT_ERROR_REDIRECT);
then add below it:
	$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'] = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = SEO_DEFAULT_ERROR_REDIRECT;
	$g_script = basename($PHP_SELF);
	$g_seo_flag = true;
	require(SEO_DEFAULT_ERROR_REDIRECT);

2. In the osc configuration for SEO-G set the SEO-G redirect to the name of the file you wrote.

To test it you could set it to privacy.php or shipping.php existing pages. So that page will then come up on 404.

I think however the default redirection with 301 will be more appropriate. If say you deleted a product or a category and the link is no longer available (because you re-set all the links) you could use the 301 redirect to your site map for instance. And depends if you know the search engine internals (ie do they prefer a 404 or a 301 is better?).

thanks ill give that a go

Dan

#19 enigma1

  • Community Member
  • 8,206 posts
  • Real Name:Mark Samios

Posted 23 April 2007, 21:29

I did an update to this module, see v1.01. This includes:
- Support to update the $_GET array as other contributions use it. Previously only the $HTTP_GET_VARS array was processed.
- Dropped seo_url_params column, osC parameters are parsed instead.
- Improved filtering so no session name parameters are passed to the SEO-G catalog class.
- Updated documentation.

v1.01 includes a better mechanism to filter the sessions from the url when the configure.php file is not setup properly with respect to cookies domain/path. So this covers for cases with a configure.php having incorrect cookie settings. Some of the other changes were discussed earlier like the $_GET array is now included with the parameters update.

#20 chrisgeek

  • Community Member
  • 63 posts
  • Real Name:Chris Samp

Posted 24 April 2007, 06:34

Exactly what kind of URLs can I get with this mod?

I'd like to have:

geekfitters.com/productname.html

Is that possible with this mod?

Thank you!