Jump to content
Sign in to follow this  
enigma1

[Contribution] SEO-G

Recommended Posts

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

Share this post


Link to post
Share on other sites

Dear,

 

I Use already Ultimate SEO URLs Contribution.

 

Is this an add on ?

 

Can you use it with this this contribution ?

 

thx,

 

Hans

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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! )

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
No it is not an add-on, it is a separate module that handles urls. You should not use both.

 

Hello looks like a great contribution. Here is my question. There lots of contributions out there like google sitemaps for example that are compatible with Ultimate seos. There many others out there that are compatible. I am interested in having all of my php pages rewritten into html which Ultimate or cre seo's do not do. I am afraid that I will break something if I install this... Do you know of any contributions that might not be compatible with this? I use Google, Yahoo, and shopzilla product feeds as well.

 

Might be a good idea to list the features of this contribution vs Utlimate seo's so people know whether it is worht the switchover.

Share this post


Link to post
Share on other sites

I added this contirbution yesterday, and everything seemed perfect, however, now I am unable to access my OsC admin. When I try, I am automatically redirected to index.asp page (Which happens to be the page I used as my redirection page in SEO-G configuration, and am assuming is the cause of my problem?).

 

Any idea on how I can access publicwholesaler.com/admin and bypass the redirection without accessing my admin to turn off the Master Switch?

 

Thanks

Share this post


Link to post
Share on other sites
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!

yes you can generate that too if you leave the prefix field empty for the products. There is some explanation with the documentation.

Share this post


Link to post
Share on other sites
I added this contirbution yesterday, and everything seemed perfect, however, now I am unable to access my OsC admin. When I try, I am automatically redirected to index.asp page (Which happens to be the page I used as my redirection page in SEO-G configuration, and am assuming is the cause of my problem?).

 

Any idea on how I can access publicwholesaler.com/admin and bypass the redirection without accessing my admin to turn off the Master Switch?

 

Thanks

the .htaccess in the catalog folder should not impact the admin. Make sure you edited the correct .htaccess for the redirection (meaning only the one for the osc catalog)

Share this post


Link to post
Share on other sites
the .htaccess in the catalog folder should not impact the admin. Make sure you edited the correct .htaccess for the redirection (meaning only the one for the osc catalog)

I have verified my admin/htaccess was not modified. any other suggestions to check?

 

Thanks for the help

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
Sign in to follow this  

×