Jump to content
Sign in to follow this  
enigma1

[Contribution] SEO-G

Recommended Posts

Mark:

 

Nice mod. I particularly appreciate the google sitemaps output. I had to remove the double quotes from $notify_string = 'http://www.google.com/webmasters/sitemaps/ping?sitemap=' . $sitemap_url . ''; that surrounded the $sitemap_url - that was it. Everything else works great. I did notice that response time (i.e. click on product to page load time) has increased to around 17 seconds - up from under 8 before. Any ideas as to how to speed things up?

 

Disregard. Apparently, there was an unrelated latency issue that coincided with the mod upload.


--

Regards,

 

J Gartner

Share this post


Link to post
Share on other sites
Hu,

 

sorry, i found all my errors and fixed it!

(i think)

 

Now, after i have read the first 3 pages of this topic i solve my problems with the categories and the "header already send" ...

 

Thanks for the great contribution!

Tyv

 

Yes I can see it that is working now. However, yesterday when I checked (and today) I get an access denied error from your categories box javascript code (haven't checked the jscript code as its beyond the scope of this thread). One other thing I noticed is that you have some of the links incorrectly set like:

 

http://88.198.164.75/product_reviews.php?&...products_id=721

 

notice the "?&" in the link. It should been just "?" so check the code around the reviews button that sets up the link parameters. Make sure the link parameters passed to the tep_href_link function are valid.

Edited by enigma1

Share this post


Link to post
Share on other sites
Mark:

 

Nice mod. I particularly appreciate the google sitemaps output. I had to remove the double quotes from $notify_string = 'http://www.google.com/webmasters/sitemaps/ping?sitemap=' . $sitemap_url . ''; that surrounded the $sitemap_url - that was it.

 

Yes you are right. A fix will be included with the next version. Thanks for that.

 

Also if you want to improve the timing/performance of your store further, check the cache contributions. A couple of them are mentioned in the readme file.

Share this post


Link to post
Share on other sites
Hi,

 

I've been following the post on the checkout success to cookie useage page problem, as I have the same problem on my site. I did add the fix you gave for the general.php file and it did correct the problem. I have tested the create account and login parts and went through the checkout process without any problems. The only thing is that I get the security alert box when I click on the continue button on the Checkout success page:

 

"You are about to be redirectd to a connection that is not secure...information you are sending might be retransmitted to a nonsecure site...."

 

How can I eliminate this prompt? Clicking Yes take me to the Index page.

 

Thanks

 

A transition will take place eventually from secure to non-secure page. That is regardless of the SEO-G and the script. The browser brings up the warning by default Like here:

https://demo.oscommerce.com/login.php

then if you click a category from the categories box you will see the browser's warning. So it happens for every transition. Since the modification in the general.php the transition occurs immediately (from checkout_success.php to index.php). If you want to maintain the secure connection for an extra page you could alter the checkout_success.php when it redirects to the index.php and specify a secure connection. Although I do not see a point doing so.

Edited by enigma1

Share this post


Link to post
Share on other sites
Hi

 

Iv Started a new store and install SEO-G 1.5 all is working but the HTTPS links do not.

 

this is the only mod i have installed.

any one have any ideas on what is wrong?

 

thanks

Yes I think I know what's wrong. I need to run few tests here first to see how to modify the .htaccess to deal with cases like this. Basically what happens is that the relative path ends up to be different between the secure/non-secure servers. And I ain't going to recommend to change the server definitions in the configure.php file because that may cause other problems. So you right now you have:

 

Secure path from DIR_WS_HTTPS_CATALOG

/~admin87/catalog/

 

Non-secure path from DIR_WS_HTTP_CATALOG

/catalog/

 

And the rewritebase in .htaccess is

/catalog/

 

Can you confirm it?

 

If so, open your catalog\includes\functions\html_output.php locate this code

//-MS- SEO-G Added
$link = $g_seo_url->get_seo_url($link, $separator);
//-MS- SEO-G Added EOM

 

change it to:

 

//-MS- SEO-G Added
if($connection == 'NONSSL')
  $link = $g_seo_url->get_seo_url($link, $separator);
//-MS- SEO-G Added EOM

 

So secure pages won't processed by SEO-G at all.

 

I will run few tests here, to see if I can alter the files to deal with both cases. Otherwise I will include a switch with the next version to control this behavior.

Share this post


Link to post
Share on other sites

Thanks change html_output and it looks like its working

 

This is my configure file

 

define('HTTP_SERVER', 'http://www.airsoftsupplydrop.co.uk'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://dprhensim91.doteasy.com/~admin87'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.airsoftsupplydrop.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'dprhensim91.doteasy.com/~admin87');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

Share this post


Link to post
Share on other sites
Thanks change html_output and it looks like its working

 

This is my configure file

 

define('HTTP_SERVER', 'http://www.airsoftsupplydrop.co.uk'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://dprhensim91.doteasy.com/~admin87'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.airsoftsupplydrop.co.uk');

define('HTTPS_COOKIE_DOMAIN', 'dprhensim91.doteasy.com/~admin87');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

 

It's incorrect. The servers should be servers, domains should be domains etc.

 

So:

 define('HTTP_SERVER', 'http://www.airsoftsupplydrop.co.uk'); // eg, [url=http://localhost]http://localhost[/url] - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://dprhensim91.doteasy.com'); // eg, [url=https://localhost]https://localhost[/url] - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.airsoftsupplydrop.co.uk');
 define('HTTPS_COOKIE_DOMAIN', 'dprhensim91.doteasy.com');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '/~admin87/catalog/');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '/~admin87/catalog/');

This won't make a difference for SEO-G, but it may with browsers.

 

I checked a bit the mods that I could make in .htaccess to have secure pages in such cases processed by SEO-G but I don't think I'll go for it. Too much overhead for the server adding regxps with the rewriterule. So probably I will include the mod I added above in html_output.php with the next version.

 

So we have:

1. To cover cases where the secure path and non-secure paths must be different.

2. To generate the xml map files such that it's useful for search engines (not a good idea to have secure pages included with the sitemap sent to google)

3. I do not think would be useful to enforce SEO with secure pages overall.

 

So my question is should I place an configuration option to turn this on/off or simply restrict it?

Share this post


Link to post
Share on other sites

ok i have a small problem with a new site i am installing this on, it is all install fine and works but when i upload the new .htaccess i get a page error on all pages, when i remove the .htaccess it goes away.

 

 

this is the error

 

Line: 2

Char: 1

Error: Syntax error

Code: 0

Page: http://www.mysite.com/mypage.html

 

this is the contecnts of my .htaccess file

 

#-MS- SEO-G Added
Options +FollowSymLinks
RewriteEngine On 
RewriteBase /
RewriteRule ^(.*).html$ root.php?%{QUERY_STRING}
RewriteRule ^(.*)\.html$ $1.php [L]
#-MS- SEO-G Added EOM

 

anyhelp would be great

 

Danny

Share this post


Link to post
Share on other sites
ok i have a small problem with a new site i am installing this on, it is all install fine and works but when i upload the new .htaccess i get a page error on all pages, when i remove the .htaccess it goes away.

this is the error

 

Line: 2

Char: 1

Error: Syntax error

Code: 0

Page: http://www.mysite.com/mypage.html

 

this is the contecnts of my .htaccess file

 

#-MS- SEO-G Added
Options +FollowSymLinks
RewriteEngine On 
RewriteBase /
RewriteRule ^(.*).html$ root.php?%{QUERY_STRING}
RewriteRule ^(.*)\.html$ $1.php [L]
#-MS- SEO-G Added EOM

 

anyhelp would be great

 

Danny

Sorry, I've seen that earlier by another poster. Where do you guys get that code from? It's not in the documentation and it's not in the sample .htaccess. Are you synthesizing it? And what version are you using?

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

Edited by enigma1

Share this post


Link to post
Share on other sites
Sorry, I've seen that earlier by another poster. Where do you guys get that code from? It's not in the documentation and it's not in the sample .htaccess. Are you synthesizing it? And what version are you using?

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

 

im using version 1.14

 

i just noticed that the code was not the same as what is in your example, so i am now using, not sure where the other came from as i have to many versions of this mod now.

but i am still getting the same error with the code below

 

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

Share this post


Link to post
Share on other sites
im using version 1.14

 

i just noticed that the code was not the same as what is in your example, so i am now using, not sure where the other came from as i have to many versions of this mod now.

but i am still getting the same error with the code below

 

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

 

But it's again incorrect.

 

Check the documentation

If osCommerce is at the root of your domain then the RewriteBase should simply be:

RewriteBase /

Edited by enigma1

Share this post


Link to post
Share on other sites
But it's again incorrect.

 

Check the documentation

 

RewriteBase /

 

 

yes my mistake, it is the same now but still have this error

 

Danny

Share this post


Link to post
Share on other sites
yes my mistake, it is the same now but still have this error

 

Danny

 

ok not sure if this helps but when i delete root.php but leave the .htaccess file the error goes away but obviously the mod wont work.

 

just to be clear, this is my .htaccess file now and am using 1.14

 

cheers

Danny

 

#-MS- SEO-G AddedOptions +FollowSymLinks
RewriteEngine On 
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}
# RewriteRule ^(.*).html$ root.php?%{QUERY_STRING}
#-MS- SEO-G Added EOM

Edited by drs101

Share this post


Link to post
Share on other sites

Not sure what is the difficulty about it. The code is still incorrect. Looks like the whole thing is in one line. Use a regular editor to edit the .htaccess file. Even the archaic notepad will do. You should dowload the files via ftp edit them and then re-upload them.

 

Each line should be terminated, without the comments should be:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}

 

and this error where do you see it? That doesn't look like a server error. Is there a link to a product to see it?

Line: 2

Char: 1

Error: Syntax error

Code: 0

Page: http://www.mysite.com/mypage.html

Share this post


Link to post
Share on other sites
Not sure what is the difficulty about it. The code is still incorrect. Looks like the whole thing is in one line. Use a regular editor to edit the .htaccess file. Even the archaic notepad will do. You should dowload the files via ftp edit them and then re-upload them.

 

Each line should be terminated, without the comments should be:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}

 

and this error where do you see it? That doesn't look like a server error. Is there a link to a product to see it?

 

 

ok let me try again, i have installed this mod on 3 other sites with no problems.

this is my .htaccess file

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}

 

this is the error on all pages

 

Line: 2

Char: 1

Error: Syntax error

Code: 0

Page: http://www.ironscience.com/index.php?cPath=2

 

 

if i take out the .htaccess file the error goes away, but the mod wont work

 

Danny

Share this post


Link to post
Share on other sites
ok let me try again, i have installed this mod on 3 other sites with no problems.

this is my .htaccess file

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteRule ^(.*).html$ root.php?$1.html&%{QUERY_STRING}

 

this is the error on all pages

 

Line: 2

Char: 1

Error: Syntax error

Code: 0

Page: http://www.ironscience.com/index.php?cPath=2

if i take out the .htaccess file the error goes away, but the mod wont work

 

Danny

 

So the error comes from the jscript. But the jscript is incorrect. First you're not using the oscommerce functions to generate the links, and second you need to specify the full url with the path.

 

This is not related with SEO-G nor osCommerce.

 

Look this selection for example:

<option value="index.php?cPath=23_24">MUSCLE</option>

 

where is the link? Client side scripts cannot replace the server side scripts.

 

And the other thing I see is some other links that are not SEO-G related. Did you go through the configuration section in the document? Do you have another seo module running? Where this comes from?

www.ironscience.com/product_info/products_id/824.html

Share this post


Link to post
Share on other sites
So the error comes from the jscript. But the jscript is incorrect. First you're not using the oscommerce functions to generate the links, and second you need to specify the full url with the path.

 

This is not related with SEO-G nor osCommerce.

 

Look this selection for example:

<option value="index.php?cPath=23_24">MUSCLE</option>

 

where is the link? Client side scripts cannot replace the server side scripts.

 

And the other thing I see is some other links that are not SEO-G related. Did you go through the configuration section in the document? Do you have another seo module running? Where this comes from?

www.ironscience.com/product_info/products_id/824.html

 

thanks for looking, and the tips ill try to track down the problem

 

Danny

Share this post


Link to post
Share on other sites

Hi All,

 

I have installed this contribution as far as I could, but have run into an error.

As soon as I add the below code to my catalog/.htaccess I get an Error 500 (Server Error).

 

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

 

Could someone please help me.

Below is a copy of my /catalog/.htaccess

 

 

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



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

<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

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

 

Thanks all, any help would be appareciated.

 

 

Matt Evans

Share this post


Link to post
Share on other sites
As soon as I add the below code to my catalog/.htaccess I get an Error 500 (Server Error).

Is this a live store or you're testing locally? If it's live can you post your configure.php file minus dbase info.

Share this post


Link to post
Share on other sites
The validator should be used to fix errors, not to fill-in the seo-g tables. Select "Products" then click "Details" then click "categories" and add the categories from there. Once you add everything click the validator to see if there are errors. Because the validator uses arrays to store the product info and the issue could be there.

 

However I will place a limit to the number of entries the validator will store to get around this.

 

Either way I would like to know if this works in your case (ie by simply adding products first and using the validator last) or you still seeing the time-out.

 

 

I installed the update from the 19th and low and behold I could see stuff on the reports page that wasn't there before. So that was helpful, but the magic number seems to be around 6700, any more than that and all I get is nothing. doing detail, validation, I was even getting the cookies page when trying to access it this morning. Other problems I am noticing with it "on" are the guest log in screen takes me back to welcome guest instead of the user name, and the quick find search goes to the advance search, and advance search goes nowhere.

Share this post


Link to post
Share on other sites
I installed the update from the 19th and low and behold I could see stuff on the reports page that wasn't there before. So that was helpful, but the magic number seems to be around 6700, any more than that and all I get is nothing. doing detail, validation, I was even getting the cookies page when trying to access it this morning. Other problems I am noticing with it "on" are the guest log in screen takes me back to welcome guest instead of the user name, and the quick find search goes to the advance search, and advance search goes nowhere.

 

Yes, for the latency/timeout in the admin (when you access the G-Controller with several thousands of products) there is an issue browsing the pages. I will include a workaround with the next version. The reports should be ok though.

 

As of the catalog issues, I will have to see it. It's possible these issues were generated due to the latency problem with the G-Controller if the script got interrupted. Because I do not see it on my end with around 8,000 products.

Share this post


Link to post
Share on other sites
Yes, for the latency/timeout in the admin (when you access the G-Controller with several thousands of products) there is an issue browsing the pages. I will include a workaround with the next version. The reports should be ok though.

 

As of the catalog issues, I will have to see it. It's possible these issues were generated due to the latency problem with the G-Controller if the script got interrupted. Because I do not see it on my end with around 8,000 products.

 

 

Do you have a suggestion to fix the catalog problems? with out the search and the log in, the rest is for nothing.

Check it out in action http://www.fantasyfestival.com/catalog/

Edited by CJPLOTTS

Share this post


Link to post
Share on other sites
Do you have a suggestion to fix the catalog problems? with out the search and the log in, the rest is for nothing.

did you clear the reports page after you upgraded? If not, clear them and retry. And also I need to see your configure.php file to see if there is a difference between the secure/non-secure settings. If you post it exclude the dbase info.

 

And try the recommendation from post #306 in this thread. It should take care of the create-account/login issue. For the advanced search I believe something is going on with the recorded urls. When I try it here, it works. As the last option you could use the exclusion list and exclude the advanced_search script from SEO-G. Although I doubt is the root of the problem.

Edited by enigma1

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  

×