Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

excuse me for "robot".
the urls work very well on the site, no problems.
This is googlebot, msnbot ...
They visit the url re-write by adding the ID in addition, as on my example
It's weird

Thank you.

Osc 2.3.4

mts template

Link to comment
Share on other sites

If you are using a sitemap, take a look at it to make sure the url's are correct. If it is one you generated from some external site, it was probably not created correctly.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

7 hours ago, ammsimon said:
excuse me for "robot".
the urls work very well on the site, no problems.
This is googlebot, msnbot ...
They visit the url re-write by adding the ID in addition, as on my example
It's weird

Thank you.

Someone posted a similar type problem just a few posts back from yours.

You need to find where in your script it is generating these parameters and then fix it, by adding code possibly. Even if the problem is already fixed / removed, google will continue to crawl the URLs indefinitely, until you put a 301 redirect on URLs of that type.

A quick fix for Google would be to ignore those parameters in webmaster tools, MSN also has an ignore parameter tool.

Link to comment
Share on other sites

Thank you for your answers.

My canonical tags are ok, pagination too (page2, 3 ..
If I have to make 301 individual ad tags it's about 1500 line on my htaccess. aie, aie, aie in french !

 

 

Osc 2.3.4

mts template

Link to comment
Share on other sites

 

In htaccess the 301 test redirects as below do not work

RewriteRule ^my-product-name-p-796.html?products_id=796.html$ https://www.mysite.com/my-product-name-p-796.html

Redirect permanent /my-product-name-p-796.html?products_id=796.html https://www.mysite.com/my-product-name-p-796.html

I think I'll leave like this

 

 

Edited by ammsimon
Incomplete

Osc 2.3.4

mts template

Link to comment
Share on other sites

1 hour ago, ammsimon said:

 

In htaccess the 301 test redirects as below do not work

RewriteRule ^my-product-name-p-796.html?products_id=796.html$ https://www.mysite.com/my-product-name-p-796.html

Redirect permanent /my-product-name-p-796.html?products_id=796.html https://www.mysite.com/my-product-name-p-796.html

I think I'll leave like this

It is probably not important to redirect these urls as I expect they work ok. However, they almost certainly come from your site, likely to be from a coding error.

You can find out where the links are being created using the internal links report in Google search console. If you want some help with this, create a separate topic and I can talk you through how to do this.

Contact me for work on updating existing stores - whether to Phoenix or the new osC when it's released.

Looking for a payment or shipping module? Maybe I've already done it.

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Link to comment
Share on other sites

4 hours ago, ammsimon said:

 

In htaccess the 301 test redirects as below do not work

RewriteRule ^my-product-name-p-796.html?products_id=796.html$ https://www.mysite.com/my-product-name-p-796.html

Redirect permanent /my-product-name-p-796.html?products_id=796.html https://www.mysite.com/my-product-name-p-796.html

I think I'll leave like this

 

 

That's invalid syntax. You cannot redirect query strings like that in htaccess.

You can do more harm than good when experimenting with htaccess like this, my suggestion is not to make entries in htaccess until the code you put is fully tested by someone who knows htaccess rules (which are complex).

On 7/16/2019 at 5:36 PM, Hotclutch said:

A quick fix for Google would be to ignore those parameters in webmaster tools, MSN also has an ignore parameter tool.

Just do this for now.

Link to comment
Share on other sites

  • 3 weeks later...

Phoenix 1.0.1.4   PHP 7.3 Test site on XAMPP

Installed and works correctly, URLs are as I have them on my live site. However at the top of every page I get this.

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in D:\********\htdocs\includes\classes\seo.class.php on line 1883

Live shop Phoenix 1.0.8.4 on PHP 7.4 Working my way up the versions.

Link to comment
Share on other sites

  • 2 months later...
30 minutes ago, magak2015 said:

I want to export all my dynamic generated HTML URLs to a .csv file or similar. 

I do not know the answer.  But if I were trying to do this, I would look at sitemap Apps

Why?  Because they generate listings of URLs and should use the same generation mechanism as osCommerce uses for regular links.  Perhaps not all of them would be compatible with this App, but at least one should. 

Always back up before making changes.

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Hello Jack,

Just installed your latest version and all works except the character conversions. I entered 

à=>a,â=>a,æ=>ae,ç=>c,é=>e,è=>e,ê=>e,ë=>e,î=>i,ï=>i,œ=>oe,ô=>o,ö=>o,ù=>u,û=>u,À=>A,Â=>A,Æ=>AE,Ç=>C,È=>E,É=>E,Ê=>E,Ë=>E,Î=>I,Ï=>I,Œ=>OE,Ô=> O,Ù=>U,Û=>U,ü=>u,ÿ=>'y',€=>Euros

but ther words with accents show up in the url as for example "lgumes" instead of "legumes", the character to be replaced not replaced! Any ideas?

 

Thanks in advance

Link to comment
Share on other sites

I haven't tested it but I think the conversion is for characters. So where you are using more than one character, like Euros, it may not work. But for the others, it should.  Try removing everything except à=>a and see if that works.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

On 12/29/2019 at 4:55 PM, Jack_mcs said:

I haven't tested it but I think the conversion is for characters. So where you are using more than one character, like Euros, it may not work. But for the others, it should.  Try removing everything except à=>a and see if that works.

No, Jack, still does not work. Sorry

Link to comment
Share on other sites

6 hours ago, artfulweb said:

Sorry for the delay Jack. I am running Phoenix v.1.0.4.1 with php 7.38.

I tried it here in a test shop and it failed for me too. It seems the php function used for the translating has problems with UTF code. Please try the following.

Replace this line

if ( is_array($this->attributes['SEO_CHAR_CONVERT_SET']) ) $string = strtr($string, $this->attributes['SEO_CHAR_CONVERT_SET']);

with this

if ( is_array($this->attributes['SEO_CHAR_CONVERT_SET']) ) $string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);

The above worked in my quick test but I suggest you test it more thoroughly.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Really curious… with this correction "légumes" shows as "lacgumes" now, the "é" being replaced mysteriously by "ac".

Here is what is configured:

à=>a,â=>a,æ=>ae,ç=>c,é=>e,è=>e,ê=>e,ë=>e,î=>i,ï=>i,œ=>oe,ô=>o,ö=>o,ù=>u,û=>u,À=>A,Â=>A,Æ=>AE,Ç=>C,È=>E,É=>E,Ê=>E,Ë=>E,Î=>I,Ï=>I,Œ=>OE,Ô=> O,Ù=>U,Û=>U,ü=>u,ÿ=>y

Link to comment
Share on other sites

15 minutes ago, artfulweb said:

Really curious… with this correction "légumes" shows as "lacgumes" now, the "é" being replaced mysteriously by "ac".

Here is what is configured:

à=>a,â=>a,æ=>ae,ç=>c,é=>e,è=>e,ê=>e,ë=>e,î=>i,ï=>i,œ=>oe,ô=>o,ö=>o,ù=>u,û=>u,À=>A,Â=>A,Æ=>AE,Ç=>C,È=>E,É=>E,Ê=>E,Ë=>E,Î=>I,Ï=>I,Œ=>OE,Ô=> O,Ù=>U,Û=>U,ü=>u,ÿ=>y

I tried other products and no matter what accented letter is replaced it is replaced by this "ac". Where does it find that?

Link to comment
Share on other sites

Try this. Remove the last change then change this line

$string = iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);

to this

$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);

Also, probably not related to this, you have Ô=> O in your array. That would cause a space to be in the url causing it to fail. As mentioned previously, you should limit the conversion entry until the code is working to be sure parts of it are not causing other problems.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

10 minutes ago, Jack_mcs said:

Try this. Remove the last change then change this line


$string = iconv("ISO-8859-1", "UTF-8//TRANSLIT", $string);

to this


$string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);

Also, probably not related to this, you have Ô=> O in your array. That would cause a space to be in the url causing it to fail. As mentioned previously, you should limit the conversion entry until the code is working to be sure parts of it are not causing other problems.

That works! Thanks, Jack.

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