Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

short question.

 

i have a multi shop running and im looking at this contri to use on my shop.

 

what i cant find is this,

will it work like this,

 

www.myshop.com/catagory/subcatagory/product-id.html

 

?

 

reason why i ask is that some products have non unique product name so i need something like a product id to make it unique.

 

second reason is that i cant have this contri to mess up my shops.

 

FWR Media :thumbsup: , thanks for cleaning up this contri and getting ride of all the additional non core stuff

 

regards,.

Link to comment
Share on other sites

i have a multi shop running

 

I would need to know more about what that means.

 

will it work like this,

 

www.myshop.com/catagory/subcatagory/product-id.html

 

As standard it works like this ..

 

Category level:

 

www.myshop.com/category-subcategory-c-91.html

 

Product level:

 

www.myshop.com/my-great-product-p-367.html

 

As long as the category path(cPath) and products_id are unique then there shouldn't be a problem.

Link to comment
Share on other sites

I would need to know more about what that means.

As standard it works like this ..

 

Category level:

 

www.myshop.com/category-subcategory-c-91.html

 

Product level:

 

www.myshop.com/my-great-product-p-367.html

 

As long as the category path(cPath) and products_id are unique then there shouldn't be a problem.

 

so from a SEO perspective this is the solution to use ?

this in combination with easy metatags ?

i see many simmilar SEO contri's out there but im not sure which one to use or which one is the "best"

 

 

thanks for your quick responds.

Edited by Ripper
Link to comment
Share on other sites

so from a SEO perspective this is the solution to use ?

this in combination with easy metatags ?

i see many simmilar SEO contri's out there but im not sure which one to use or which one is the "best"

thanks for your quick responds.

 

Others may disagree but I wouldn't use anything other than ULTIMATE SEO URLs (2.1d updated).

Link to comment
Share on other sites

Others may disagree but I wouldn't use anything other than ULTIMATE SEO URLs (2.1d updated).

I agree, your (Chemo's) version is very easy to install, few changes to existing files, and fantastic support from you.

Link to comment
Share on other sites

I agree, your (Chemo's) version is very easy to install, few changes to existing files, and fantastic support from you.

 

Thanks for the kind comments.

 

Can I just clear up that this is ENTIRELY Chemo's contribution, I just tidied a few bits up for MySQL5 etc.

Link to comment
Share on other sites

the site I had the issue with in my earlier post has come back

 

The site is so slow to load.

 

I hav turned off the product cache but still the pages will not load correctl.

 

 

Is there another option I should turn off or on to spee things up? I do have 100,000 products or so

Link to comment
Share on other sites

1)Where is your shop

 

www.mysite.com/

or

www.mysite.com/catalog/

etc.

 

2) What do you have in .htaccess for the RewriteBase?

 

3) Is mod_rewrite enabled on your server?

 

4) If you put garbage in .htaccess like kjjsfadahhqhewhhwhAF does it throw an error?

 

Hi Robert, I can send you this info:

 

1) My shop is in: www.mysite.com/catalog/

 

2) I send you the complete code of my .htaccess file:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /usr/home/timeattack/catalog
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

3) I can see "mod_rewrite" in the Loaded Modules, looking in the server info.

 

4) Which kind of error I must see by putting garbage code in the file? where I have to write this code?

I try to add the "kjjsfadahhqhewhhwhAF" row at the end of the file but I don't see any error, when I activate the contribution the error is the same:

 

Not Found

The requested URL /catalog/category-subcategory-c-64_65_138.html was not found on this server.

Apache/2.0.50 (FreeBSD) PHP/4.3.9 Server at www.mysite.com Port 80

 

Thank you,

Nik

Edited by KaeruNoMe
Link to comment
Share on other sites

Link to comment
Share on other sites

Others may disagree but I wouldn't use anything other than ULTIMATE SEO URLs (2.1d updated).

 

 

uhm,. okay,.

 

started but im stuck at step 3,

 

STEP #3 - Edit includes/functions/html_output.php

 

what i should replace doesnt excist in my file.

 

this is what i got whiting that html wrapper funciton,

 

////

// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {

if ($page == '') {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_ADMIN;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == 'true') {

$link = HTTPS_SERVER . DIR_WS_ADMIN;

} else {

$link = HTTP_SERVER . DIR_WS_ADMIN;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($parameters == '') {

$link = $link . $page . '?' . SID;

} else {

$link = $link . $page . '?' . $parameters . '&' . SID;

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

return $link;

}

 

function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {

if ($connection == 'NONSSL') {

$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL_CATALOG == 'true') {

$link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;

} else {

$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($parameters == '') {

$link .= $page;

} else {

$link .= $page . '?' . $parameters;

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

return $link;

}

 

what do i replace,.?

Link to comment
Share on other sites

uhm,. okay,.

 

started but im stuck at step 3,

 

STEP #3 - Edit includes/functions/html_output.php

 

what i should replace doesnt excist in my file.

 

this is what i got whiting that html wrapper funciton,

 

////

// The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL') {

if ($page == '') {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_ADMIN;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == 'true') {

$link = HTTPS_SERVER . DIR_WS_ADMIN;

} else {

$link = HTTP_SERVER . DIR_WS_ADMIN;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($parameters == '') {

$link = $link . $page . '?' . SID;

} else {

$link = $link . $page . '?' . $parameters . '&' . SID;

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

return $link;

}

 

function tep_catalog_href_link($page = '', $parameters = '', $connection = 'NONSSL') {

if ($connection == 'NONSSL') {

$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL_CATALOG == 'true') {

$link = HTTPS_CATALOG_SERVER . DIR_WS_CATALOG;

} else {

$link = HTTP_CATALOG_SERVER . DIR_WS_CATALOG;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL<br><br>Function used:<br><br>tep_href_link(\'' . $page . '\', \'' . $parameters . '\', \'' . $connection . '\')</b>');

}

if ($parameters == '') {

$link .= $page;

} else {

$link .= $page . '?' . $parameters;

}

 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

 

return $link;

}

 

what do i replace,.?

 

The whole tep_href_link function

Link to comment
Share on other sites

so everything i pasted in the posting ?

 

It will certainly help if you edit the correct file.

 

You are editing catalog/admin/includes/functions/html_output.php

 

The instructions ask you to edit catalog/includes/functions/html_output.php

Link to comment
Share on other sites

It will certainly help if you edit the correct file.

 

You are editing catalog/admin/includes/functions/html_output.php

 

The instructions ask you to edit catalog/includes/functions/html_output.php

 

 

i know,. thats what i posted,.

Link to comment
Share on other sites

i know,. thats what i posted,.

 

Nope that included function tep_catalog_href_link

 

function tep_catalog_href_link is in the admin file only.

Link to comment
Share on other sites

Nope that included function tep_catalog_href_link

 

function tep_catalog_href_link is in the admin file only.

 

 

well that is what is in the catalog/includes/functions/html-output.php file.

 

im running multi shop, maybe that got something to do with it.

Link to comment
Share on other sites

I can only help you with this contribution not "quirks" attributable to other contributions.

 

Anyway .. the code you posted was not one function it was two .. you need to replace one function which is function tep_href_link other than that I can't help you as you do not have standard files.

Link to comment
Share on other sites

RewriteBase /catalog/

 

Yes, I try this code also, but the error is the same: "file not found" when SEO is active and I call a category page on my store.

Considering I don't see any error if I put garbage in the .htaccess code, is it possible that the error is not in this file?

What kind of error I must see?

 

Thank you again,

Nik

Link to comment
Share on other sites

Yes, I try this code also, but the error is the same: "file not found" when SEO is active and I call a category page on my store.

Considering I don't see any error if I put garbage in the .htaccess code, is it possible that the error is not in this file?

What kind of error I must see?

 

Thank you again,

Nik

 

If .htaccess does not kick errors when filled with rubbish then this is your problem. The server does not allow changes in .htaccess.

 

It's the AllowOverride rules.

Link to comment
Share on other sites

If .htaccess does not kick errors when filled with rubbish then this is your problem. The server does not allow changes in .htaccess.

 

It's the AllowOverride rules.

 

Yes, with AllowOverride setting is ok!

Thank you very much Robert :D

Link to comment
Share on other sites

I still have not been able to figure out the problem discussed before but am working on it. I have come accross a new problem. When a manufacturer is chosen for the dropdown menu instead of going to the manufactuers page it redirects to catalog=index.php. The same thing happens when you select from the categories dropdown menu! Does anyone know how to fix this?

 

Thanks!!!

 

Does anyone have any suggestions of where to look to fix the above problems? Please help me!!

Link to comment
Share on other sites

I have just installed this contribution and it works really great.

I am selling books and I would like to make a change (but I dont know where).

This contribution is creating url from table products_description/products_name ... is it possible to add after the products_name in URL another cell from table products/products_writer (it is varchar 255).

I need the URL to be products_name + products_writer

Is it possible? What should I modify?

Link to comment
Share on other sites

Hello

 

I want to get rid of the c-81.html or p-23.html or any other letter or number.

I tried disabling the category "c" from Admin and it did not worked.

i tried to delete the -c- from .htaccess and it did not worked(products were not showing).

Any ideas?

thanks

Link to comment
Share on other sites

Hello

 

I want to get rid of the c-81.html or p-23.html or any other letter or number.

I tried disabling the category "c" from Admin and it did not worked.

i tried to delete the -c- from .htaccess and it did not worked(products were not showing).

Any ideas?

thanks

 

This contribution will not work with that removed.

Link to comment
Share on other sites

Hi,

 

Sorry it has been a while since i was here but i have a big problem... A bit out of practice i think...

 

When i edit the .htaccess file i get a 500 Internal Server Error.

 

Does anyone know what i'm doing wrong?

 

Thanks in advance

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