Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] SEO-G


Guest

Recommended Posts

v1.16 is now available with the following modifications:

 

- Added Secure pages switch for SEO-G links generation.

- Added Continuous URL check switch for links testing/generation purposes.

- Added validation for SEO words generation.

- Added handling for the "page" parameter.

- Fix for google sitemap filename generation. Removed unecessary quotes.

- Fix for G-Controller - sql queries timeout with a large number of products.

- Updated documentation.

Link to comment
Share on other sites

  • Replies 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Hello,

 

Installed this fantastic mod, but i get the following error when i check the notify google box and click google xml:

 

Warning: fopen(http://www.google.com/webmasters/sitemaps/ping?sitemap="http://www.fragrancedepot.co.uk/google_sitemap.xml.gz") [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /home/collings/public_html/admin/seo_reports.php on line 121

 

Warning: Cannot modify header information - headers already sent by (output started at /home/collings/public_html/admin/seo_reports.php:121) in /home/collings/public_html/admin/includes/functions/general.php on line 18

 

Any help would be greatlt appreciated. As for the headers thing ive double checked the whitespaces and their are none.

 

Regards

Chris

Link to comment
Share on other sites

Hello,

 

Installed this fantastic mod, but i get the following error when i check the notify google box and click google xml:

 

Warning: fopen(http://www.google.com/webmasters/sitemaps/ping?sitemap="http://www.fragrancedepot.co.uk/google_sitemap.xml.gz") [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /home/collings/public_html/admin/seo_reports.php on line 121

 

Warning: Cannot modify header information - headers already sent by (output started at /home/collings/public_html/admin/seo_reports.php:121) in /home/collings/public_html/admin/includes/functions/general.php on line 18

 

Any help would be greatlt appreciated. As for the headers thing ive double checked the whitespaces and their are none.

 

Regards

Chris

it's not the headers. can you post your catalog\admin\includes\configure.php. Don't post the dbase info I just need to see the catalog definitions from it. Or do this: After this code in the seo_reports.php

 

$notify_string = 'http://www.google.com/webmasters/sitemaps/ping?sitemap=' . $sitemap_url;

 

add

die($notify_string);

And check the output. Check if the sitemap url is correct when you try to notify google.

Edited by enigma1
Link to comment
Share on other sites

With v1.16 the page parameter is added. By default this enhancement will support seo links generation for multiple pages with the products_new.php and specials.php scripts.

 

Here is a method to generate seo links for the page splits with the categories listings.

 

In catalog\includes\functions\general.php function tep_create_sort_heading change the function to:

////
// Return table heading with sorting capabilities
 function tep_create_sort_heading($sortby, $colnum, $heading) {
global $PHP_SELF, $spider_flag, $HTTP_GET_VARS;

if( $spider_flag ) {
  unset($HTTP_GET_VARS['sort']);
}

$sort_prefix = '';
$sort_suffix = '';

if ($sortby && !$spider_flag) {
  $sort_prefix = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">';
  $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';
  return $sort_prefix . $heading . $sort_suffix;
}
return $heading;
 }

This will create seo-g links for multiple pages with categories listings also. In effect by removing the 'sort' parameter when a spider is present. It can be also useful because you do not want the spiders to index pages by the 'sort' links cuz this may count as duplicated content.

 

I will not include these methods in the documentation though since they go outside the scope of installing/integrating the module with your store.

Link to comment
Share on other sites

That's a greater mod than any other SEO mods

I have installed Version 1.5, and everything goes well except that All urls thanslate to :

 

http://mydomain/root.php?xxx.html

 

How could I remove the root.php?

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

That's a greater mod than any other SEO mods

I have installed Version 1.5, and everything goes well except that All urls thanslate to :

 

http://mydomain/root.php?xxx.html

 

How could I remove the root.php?

there isn't a version 1.5 and the root.php is not supposed to be mangled with the url.

 

Have you followed the install instructions and do you have a url to a translated page?

Link to comment
Share on other sites

there isn't a version 1.5 and the root.php is not supposed to be mangled with the url.

 

Have you followed the install instructions and do you have a url to a translated page?

 

Sorry, it's version 1.15

 

See it in my website: http://www.tina.bodait.com and I read the install instructions carefully.

 

In the .htaccess file, I find "RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}", is it because the 'root.php' here?

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

Just wanted to say many thanks to the author, enigma1, for one truly awesome contribution.

 

Setup and install could not have gone any easier. Works as described and extremely flexible SEO friendly URL creation. Almost as impressive as the actual working contribution is the README file for the contribution. Best I have ever seen for an OSC contribution, for that matter, beats almost any type of open source script installation instructions I have come across!

 

ENIGMA1, MANY MANY THANKS AGAIN.

 

Regards, Bill

osC details

osCommerce 2.2-MS2

PHP Version: 4.3.8 (Zend: 1.3.0)

Apache Release 10331100

MySQL 4.0.27-standard

Link to comment
Share on other sites

In the .htaccess file, I find "RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}", is it because the 'root.php' here?

 

Yes I see... Do not change the .htaccess the root.php represents the decoder so you need it there. However looks like the cookies path does not follow the domain? Why is that? The cookies settings in the configure.php must match the domain. Looking from the outside I see:

 

cookie_test=please_accept_for_session; expires="Thu, 28-Jun-2007 14:05:28 GMT"; domain=tina.bodait.com; path=/

 

And an extra redirect takes place possibly due to this inconsistency.

 

Post your .htaccess and configure.php (minus database info)

Link to comment
Share on other sites

I use chemos mod atm. And the biggest draw back to it that i see is. If you change your products name, or a website shortens your url it . it does not 301 to the current url set. So you end up with duplicate content. I hope you follow me. Does this mod work the same way? Is it possable to have more than 1 url to the same product?

 

Thought i would ask before going thur the trouble of switching.

Link to comment
Share on other sites

I use chemos mod atm. And the biggest draw back to it that i see is. If you change your products name, or a website shortens your url it . it does not 301 to the current url set. So you end up with duplicate content. I hope you follow me. Does this mod work the same way? Is it possable to have more than 1 url to the same product?

 

What's the atm stands for?

 

If you change the product's name with SEO-G using the default configuration another entry for the new product name will be stored. The old one remains. Now if you set the contnuous check switch on, it will instruct the module to generate another url for the same product. In other words in the reports you should see:

 

somesite.com/catalog/product_info.php?products_id=5 -> somesite.com/catalog/old_product_name.html

somesite.com/catalog/product_info.php?products_id=5 -> somesite.com/catalog/new_product_name.html

 

So now links pointing to the old_product_name.html will be decoded as well as links pointing to new_product_name will also point to the same product.

 

If I understand correctly what you want to do is to use another table for redirection such that:

old products name, 301 redirect to: somesite.com/catalog/product_info.php?products_id=5

new products name, direct mapping to: somesite.com/catalog/product_info.php?products_id=5

 

Is that correct? If so it will require an extra table like a redirection table where you can move urls from the report page into this new table. Then for incoming urls the redirection tables is checked first if a match is found, a 301 is performed (in root.php file). The redirection table will be an identical table as the reports one (minus the google details).

 

In its current form (if the old products name does not exist because you can delete it from the reports page) SEO-G will do a redirect but it will be in the page you setup as the redirection page (SEO-G Redirect switch).

Edited by enigma1
Link to comment
Share on other sites

I attempted to apply this contribution but I had quite a few problems, not the least of which being that I got "file not found" when the seo addresses were active. Being responsible, I had backed up my files and database, so I attempted to return them to what they had been before the aplication of seo-g. Now I get this error message at the head of every page of the store (similar to messages I got immediately following the installation of seo-g):

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/s/p/e/specterstudios/html/store/catalog/includes/filenames.php:126) in /home/content/s/p/e/specterstudios/html/store/catalog/includes/functions/sessions.php on line 97

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/s/p/e/specterstudios/html/store/catalog/includes/filenames.php:126) in /home/content/s/p/e/specterstudios/html/store/catalog/includes/functions/sessions.php on line 97

 

And I get this message when I try to make any change from the admin area (similar to messages I got immediately following the installation of seo-g):

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/p/e/specterstudios/html/store/catalog/admin/includes/languages/english.php:640) in /home/content/s/p/e/specterstudios/html/store/catalog/admin/includes/functions/general.php on line 23

 

Luckily, the change usually goes through after I back out, but I would still prefer not to get these messages at all. What can I do to rectify this? If more information is needed, I will do my best to provide it.

Link to comment
Share on other sites

I attempted to apply this contribution but I had quite a few problems, not the least of which being that I got "file not found" when the seo addresses were active. Being responsible, I had backed up my files and database, so I attempted to return them to what they had been before the aplication of seo-g. Now I get this error message at the head of every page of the store (similar to messages I got immediately following the installation of seo-g):

perhaps you should read posts #310, #341 of this thread.

 

I believe you did not make a proper backup otherwise you wouldn't see the errors upon restoring the files. You probably edited files manually instead of restoring leaving whitespace.

 

Don't know how else to emphasize it but the mods to the .htaccess are critical as well as it's critical to have a proper setup of the configure.php file. Samples are included with the SEO-G archive.

Link to comment
Share on other sites

First of all thank you for a great contribution. I've used it sometime now, but with v. 1.16 I've stumbled into a weird problem. When the SEO URLs are in use the design of the store changes for some reason. The site itself is greatly modified, but I've installed the SEO-G line-by-line so that shouldn't be a problem. And since SEO-G is supposed only to generate simplier URLs I don't understand why the design says PFFFRRT when it's in use.

 

I will PM the address of the testsite if you might know what's wrong. Don't like to have any rushhour on the test environment. :)

Link to comment
Share on other sites

First of all thank you for a great contribution. I've used it sometime now, but with v. 1.16 I've stumbled into a weird problem. When the SEO URLs are in use the design of the store changes for some reason. The site itself is greatly modified, but I've installed the SEO-G line-by-line so that shouldn't be a problem. And since SEO-G is supposed only to generate simplier URLs I don't understand why the design says PFFFRRT when it's in use.

 

I will PM the address of the testsite if you might know what's wrong. Don't like to have any rushhour on the test environment. :)

 

Ok I checked it. I noticed you switched on the name building so the urls are now ok.

 

For the other issue the design you have some other dependency. Checking your html source I see for pages not translated by SEO-G:

 

<a name="top"></a>
<table width="962" border="0" cellspacing="0" cellpadding="0" align="center">

 

While with translated pages I see

<a name="top"></a>
<table width="MAIN_WIDTH" border="MAIN_BORDER" cellspacing="MAIN_CELLSPACING" cellpadding="MAIN_CELLPADDING" align="MAIN_ALIGNMENT">

Now where that comes from? Why these definitions aren't set when SEO-G is active? Because you probably did not port your application_top.php properly as required and mentioned in the documentation. You must have a bunch of definitions pulled in application_top.php but not in root.php. Both files have to be consistent.

Link to comment
Share on other sites

This helped, you really generate a wooden eye when staring at the code for few hours. :) Thank you.

ok if you have some ideas how to improve the documentation, just post them. I don't know how else to rephrase the instructions, but the critical files that can cause errors during installation are:

 

catalog\root.php (must be in synch with application_top.php)

catalog\includes\application_top.php (must be in synch with root.php)

catalog\includes\configure.php (servers, paths, cookies must be correct and match the server running)

catalog\.htaccess (rewritebase should match the path in the configure.php)

Link to comment
Share on other sites

Enigma1: Thanks for this contribution, I think it will make all the difference with my ratings, but I am having some problems with the contribution, Any help will be greatly appreciated.

 

I do not have a vanilla osCommerce system but have implemented C.R.E. Loaded... a version with over 40+ pre installed scripts.

 

My website is: http://www.spoolmotorsports.com

 

I have read through all 19 pages of forum work and I have not come to an solution for this.

 

After reinstalling over 5 times I can not get the contribution to work.

 

Everything seems to work in the admin section. The tables are being written and when I turn the Master switch on, the index page is there fine, I can see in the status bar the link and it seems to be correctly up but when I click it I get a "PAGE NOT FOUND" error.

 

One difference that I have seen is the .htaccess, first it is dot.htaccess... if I change it too .htaccess I get a 500 error. I have included the code I am using which allready has some attributes added:

 

# $Id: .htaccess,v 1.2 2003/09/24 13:57:00 wilt 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 All

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



# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter




AcceptPathInfo On



# PHP configuration values



<IfModule mod_php5.c>

php_flag register_long_arrays On

php_value register_globals On

php_flag display_errors Off

</IfModule>



<IfModule mod_php4.c>

php_value session.use_trans_sid 0

php_value register_globals 1

php_flag display_errors Off

php_flag track_errors On

</IfModule>



# The following RewrtieRules have been added as additional

# security enhancement. These are not required for the

# normal operation of the cart and may optionally be turned off.



# RewriteEngine On
# RewriteBase /



# prevent any php code from direct execution in these open folders


RewriteRule admin/backups/(.*)\.php $1.html [L]

RewriteRule admin/images/graphs/(.*)\.php $1.html [L]

RewriteRule debug/(.*)\.php $1.html [L]

RewriteRule images/(.*)\.php $1.html [L]

RewriteRule includes/key/(.*)\.php $1.html [L]

RewriteRule includes/languages/(.*)\.php $1.html [L]

RewriteRule pub/(.*)\.php $1.html [L]

RewriteRule temp/(.*)\.php $1.html [L]

RewriteRule tmp/(.*)\.php $1.html [L]


# This is an example - Do not blindly copy this file to your catalog folder - Follow the manual instructions and change the RewriteBase to match your store
#-MS- SEO-G Added
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}
#RewriteRule ^(.*).html$ root.php?%{QUERY_STRING}
#-MS- SEO-G Added EOM

 

 

 

 

I have to assume it is a .htaccess problem, and I don't think that the name is really the problem...

 

I have tried every trick in the book to include not using Dreamweaver... which is my main modifier. I have used Notepad for this.

 

One thing I don't have a clue on is the comparison between application_top.php and root.php

 

Another question is while validating and establishing the tables I have a problem with timeouts... (I have over 90,000+ items in stock)...

 

Any Help Would Be Greatly Appreciated!

 

Thanks,

Erik "Rex" Rexach

Owner and Modifier

Spool Motorsports

Link to comment
Share on other sites

Just wanted to say many thanks to the author, enigma1, for one truly awesome contribution.

 

Setup and install could not have gone any easier. Works as described and extremely flexible SEO friendly URL creation. Almost as impressive as the actual working contribution is the README file for the contribution. Best I have ever seen for an OSC contribution, for that matter, beats almost any type of open source script installation instructions I have come across!

 

ENIGMA1, MANY MANY THANKS AGAIN.

 

Regards, Bill

 

configure.php:

define('HTTP_SERVER', 'http://tina.bodait.com'); // eg, [url="http://localhost"]http://localhost[/url] - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, [url="https://localhost"]https://localhost[/url] - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'tina.bodait.com');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

.htaccess:

<IfModule mod_setenvif.c>
 <IfDefine SSL>
   SetEnvIf User-Agent ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
 </IfDefine>
</IfModule>


#-MS- SEO-G Added
Options +FollowSymLinks
RewriteEngine On
# Next line must be changed to match your osCommerce folder - the relative path 
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING} [R=301,L]
#-MS- SEO-G Added EOM

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

ok then you have something else because you posted

 

www.tina.bodait.com where the configure.php shows tina.bodait.com

 

Do you have something with your cpanel to add the www infront? Must be another server setting somewhere.

 

And enable the Auto-Builder why is off?

Link to comment
Share on other sites

One difference that I have seen is the .htaccess, first it is dot.htaccess... if I change it too .htaccess I get a 500 error.

 

Why is dot.htaccess? Do see this written in the documentation? And try with the default htaccess you have all kinds of rules that can mess things up. I don't know where you got them from, you should had stayed with oscommerce. What was was the big idea going with cre? (Other than having trouble). Not to mention is commercial too now isnt it?

Edited by enigma1
Link to comment
Share on other sites

something miss in the configure.php above:

 

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/tina/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Everyone is changing the world.

Everyone is a world.

For everyone needs my help, PM or email if I amn't online.

Link to comment
Share on other sites

Why is dot.htaccess? Do see this written in the documentation? And try with the default htaccess you have all kinds of rules that can mess things up. I don't know where you got them from, you should had stayed with oscommerce. What was was the big idea going with cre? (Other than having trouble). Not to mention is commercial too now isnt it?

 

C.R.E. Loaded is actually free... It saved me tons of time with the contribution already installed, all contributions are from osCommerce contributors like yourself, the only down side is that since you personally didn't install then it is hard to understand the process... I have not had any problem with the other parts of this version of osCommerce, actually it saves you tons of time....

 

The only problem is the that the pages, just like osCommerce are dynamic... bad for search engines... that is why I am trying to incorporate this awsome contribution.

 

Well I feel like a total jackass... I found the problem and it is working excellently...

 

OH SO CLOSE!

While the pages are being shown... I try to add items to my shopping cart nothing happens... just resets

Now my last problem is the timing out while validating (again I have over 90,000+ items)

 

I know I have broken the cardinal rule but any help would be greatly appreciated!

 

Thanks,

Erik "Rex" Rexach

Owner and Modifier

Spool Motorsports

Link to comment
Share on other sites

something miss in the configure.php above:

 

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/tina/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

No that's not it. There must be either another htaccess in a parent folder, or some setting from your host's cpanel that you've set and injects the www.

Link to comment
Share on other sites

Hmm.. well this problem happened because I tried to sync, but was too tired or something to see all the differences. But learned something in the process. :) Maybe you should emphasize the critical points like these on the documentation. This might help some people to do their own troubleshooting. Still, your documentation is one of the best ones I've ever seen.

 

ok if you have some ideas how to improve the documentation, just post them. I don't know how else to rephrase the instructions, but the critical files that can cause errors during installation are:

 

catalog\root.php (must be in synch with application_top.php)

catalog\includes\application_top.php (must be in synch with root.php)

catalog\includes\configure.php (servers, paths, cookies must be correct and match the server running)

catalog\.htaccess (rewritebase should match the path in the configure.php)

Edited by jemmasta
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...