Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


Recommended Posts

Look for

 

return htmlspecialchars(utf8_encode($link));

 

in your sep_class.php. Notice that this line exists twice.

 

Replace both with

 

return str_replace('"','"',str_replace('>','>',str_replace('<','<',utf8_encode($link))));

 

For me it worked. Good luck!

 

This fixed the problem for add to wishlist, but doesn't fix it for add to cart or for the products from a category. Does this code exist elsewhere?

Link to comment
Share on other sites

I've got it installed and working flawlessly, except by one thing I have a link to all categories, it would redirect you to

 index.php?cPath=0   
http://www.brazilainhotstuff.com/index.php?cPath=0

it won't work anylonger... it redirects me back to the index....

what would be the new link I should use? or better how do I fix it?

 

Thanks!!!

Link to comment
Share on other sites

Today, I installed Ultimate SEO URLs. Thank you in advance for this contrib!

 

I am having what is hopefully a small problem that can easily be fixed. I have read & reread previous posts but have not been able to ascertain how to fix this problem. With Ultimate SEO URL enabled, when you click on one of the categories you get the error message "HTTP 404 - File not found". For example:

 

With Ultimate SEO URLs enabled the link for the hardware category takes you to http://custom-farmnet.com/oscommerce/hardware-c-1.html

 

With Ultimate SEO URLs disabled the link for the hardware category takes you to http://custom-farmnet.com/oscommerce/index.php/cPath/1

 

With Ultimate SEO URL disabled, all categories & products display fine. However, with it turned on, none of the categories or products will display.

 

I left all the settings in the Ultimate SEO URL configuration in their default setting. I did try to disable automatic redirects (by default it is set to true) however, this didn't seem to make any difference.

 

Has anyone else had this problem & been able to fix it? Thank you in advance for your help!

Link to comment
Share on other sites

I seen a post earlier but no fix as to why when I click on continue shopping from viewing a product it says in FF that the server is attempting to redirect in a way that will nerver finish.

 

I got to looking and with mouse-over the url displayed is the same as the product I am viewing.

 

I am using the latest verison with support for HTC and Links Manager

 

To see what I am talking refering to here is My Store

 

Hopefully someone has ran into this before.

 

Thanks,

 

Eric

Link to comment
Share on other sites

Well I was having a look but it seems you are dabbling atm as I started to get 500 errors.

Link to comment
Share on other sites

I just replaced the seo.classes.php file that was supposed to fix the redirect problem. However it didnt fix my problem.

 

Here it is again,

When viewin a product the url in the address bar is this

mystore/microsoft-intellimouse-explorer-p26.html

 

when on mouse over on the back button in the bottom left where the redirect url is displayed this is the url

mystore/index.php?products_id=26

 

Does anyone know how or what I need to change to fix this this is the error that I get in firefox

 

The page isn't redirecting properly

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

* This problem can sometimes be caused by disabling or refusing to accept cookies

Link to comment
Share on other sites

I just replaced the seo.classes.php file that was supposed to fix the redirect problem. However it didnt fix my problem.

 

Here it is again,

When viewin a product the url in the address bar is this

mystore/microsoft-intellimouse-explorer-p26.html

 

when on mouse over on the back button in the bottom left where the redirect url is displayed this is the url

mystore/index.php?products_id=26

 

Does anyone know how or what I need to change to fix this this is the error that I get in firefox

 

The page isn't redirecting properly

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

* This problem can sometimes be caused by disabling or refusing to accept cookies

 

Hi ,

i installed Ultimate SEO url contribution it works

but i think something is wrong.

When you try to add products to your cart .

it goes to the page where your cart is

but it says there is nothing in your cart.

whereever you get a product it still doesnt show up in your cart

 

no one can buy stuff at the moment

 

are you able to tell me what the problem is

 

thanks

 

greg

www.onestopadultshop.com

Link to comment
Share on other sites

Is there any support in here for this contrib at all I installed 2.2 with the link manager fix I narrowed it down to where the back button is using the url redirect and the the tep herf link () function. I just dont know where that fuction is.

Link to comment
Share on other sites

I've got it installed and working flawlessly, except by one thing I have a link to all categories, it would redirect you to

 index.php?cPath=0   
http://www.brazilainhotstuff.com/index.php?cPath=0

it won't work anylonger... it redirects me back to the index....

what would be the new link I should use? or better how do I fix it?

 

Thanks!!!

 

if anyone else is interested on solving the same problem... here it is:

http://www.mywebsite.com/index-c-0.html

it will redirect you to the base of your categories of your store ;)

I tried it all by myself and finally got somewhere :)

check it out if you don't know what I am talking about

http://www.brazilianhotstuff.com/index-c-0.html

Link to comment
Share on other sites

for anyone interested I just found chemos forum and actual support for his work by him.

 

Since no one can help with this issue why not talk to the man who created it right.

 

here you goWebpage

Edited by matrix2223
Link to comment
Share on other sites

Bug - in latest fix a bug - Ultimate SEO provides link like:

 

/movie-tshirts-blue-velvet-c-205_207.html?amp;products_id=43&action=buy_now

 

You need to fix it - in function parse_parameters before return:

 

$url = str_replace('?amp;','?',$url);

Link to comment
Share on other sites

Hey,

 

I have just put in the contribution area Chemo's Official v2.1d that he made AGES ago but wasn't in the contribution area. (I believe there was originally licensing issues but the license for this contribution is now fine).

 

Anyway, I am running it in my store and its working great.

 

One thing I would like to see changed is that some of my product names have changed, and the links are then not updated in Google. So I think it needs the need_redirect() function to be sorted out for this (but I dont think any of the current versions has this sorted out anyway).

 

Note: This version actually came out before anyone else started contributing to it, so any changes done to 2.1c by others to make other versions, will not have those same changes in this version.

 

Enjoy.

 

Cheers,

Chris

Link to comment
Share on other sites

One thing I would like to see changed is that some of my product names have changed, and the links are then not updated in Google. So I think it needs the need_redirect() function to be sorted out for this (but I dont think any of the current versions has this sorted out anyway).

 

None of the versions seems to have a solution for "redirecting" changed names , it will actually create duplicate content in the search engines if you change the name of a product. (This is because Ultimate SEO URLS uses the product/cat id value to set the product/cat path and not the name itself)

 

It is possible to make a redirect script but be aware that it would increase the server ressource use of this contribution on your server/hosting.

 

So if you change a product name by just editing an exsisting product you will have 1 page with several urls like this... (This ofcourse assumes that your old name/url has already been indexed by the search engines)

 

/gadget-name1-p.1.html

/gadget-name2-p-1.html

/gadget-name3-p-1.html

 

All leading to the same page and creating duplicate content

 

What you could do instead is that when you want/have to change a product name you do this:

 

1. Delete the original product.

2. Create a new product with the new name.

 

Why:

 

The product will now have a new product id and only the new url will lead to it.

Link to comment
Share on other sites

None of the versions seems to have a solution for "redirecting" changed names , it will actually create duplicate content in the search engines if you change the name of a product. (This is because Ultimate SEO URLS uses the product/cat id value to set the product/cat path and not the name itself)

 

It is possible to make a redirect script but be aware that it would increase the server ressource use of this contribution on your server/hosting.

 

So if you change a product name by just editing an exsisting product you will have 1 page with several urls like this... (This ofcourse assumes that your old name/url has already been indexed by the search engines)

 

/gadget-name1-p.1.html

/gadget-name2-p-1.html

/gadget-name3-p-1.html

 

All leading to the same page and creating duplicate content

 

What you could do instead is that when you want/have to change a product name you do this:

 

1. Delete the original product.

2. Create a new product with the new name.

 

Why:

 

The product will now have a new product id and only the new url will lead to it.

 

You are right in saying that it will increase server resources, but I do not believe it will increase them by much at all.

The problem with having links in google that are different but all link to the exact same page is that Google penalises pages that have identical content. So to avoid this, it is best to permanently redirect Google to the NEW link instead of letting it use the old links, and then also picking up any new links.

 

For example, Google has 12,200 links to my site, but I only have around 2200 products, and maybe 200 categories. If you then look at the listings of some of the pages, the URL is COMPLETELY different to what it is pointing to (even though the title in Google is correct to the actual page).

If you go to google and do a search on "site:www.stonebridgecomputing.com.au" (no quotes) then you will see near the top a link for "Celeron & Pentium (Mobile)" CPU's. If you were to click on it then it comes to the correct page for that category, but look at the URL (the URL is http://www.stonebridgecomputing.com.au/cat...-rom-c-81.html) which has the wrong category name in it. Now this is probably due to problems that happened with my catalog a while ago meaning all products and categories had to be re-imported, which then mixed up category ids with category names.

 

I believe this issue will be faced by a lot of people.

 

Now, someone on Chemo's forum proposed a fix for this problem, and I did the fix and the store was running fine except the fact that it created HEAPS of sessions for each user, which I do not want at all. Here is the code that was suggested anyway:

 

change your need_redirect function for this one

function need_redirect() {
if (is_numeric(strpos($this->real_uri, '{'))) {
	$this->need_redirect = false;
}
else {
	foreach ($this->reg_anchors as $param => $value) {
		$pattern[] = $param;
		$arAnchorValues[] = $value;
	}
	$this->uri != $this->real_uri ? $this->need_redirect = false : eregi("(cName|pName|mName)", $this->uri) ? $this->attributes['SEO_REWRITE_TYPE'] != 'cName' ? $this->need_redirect = true : $this->need_redirect = false : eregi("(" . implode('|', $pattern) . ")", $this->uri) ? $this->need_redirect = true : $this->need_redirect = false;
}

$arRealUriParts = parse_url($this->real_uri);
$strGeneratedLink = $this->href_link(basename($arRealUriParts['path']), $arRealUriParts['query'], (strtolower($arRealUriParts['scheme']) === 'https') ? 'SSL' : 'NONSSL');

if (is_array($arAnchorValues)) {
	if (eregi("(" . implode('|', $arAnchorValues) . ")", $this->uri) && $this->uri != basename($strGeneratedLink)) {
		$this->need_redirect = true;
		$this->uri_parsed = $arRealUriParts;
	}
}
}

 

My original need_redirect funtion is this though:

/**
* Function to check if the URL needs to be redirected 
* @author Bobby Easland 
* @version 1.2
*/	
function need_redirect(){		
	foreach( $this->reg_anchors as $param => $value){
		$pattern[] = $param;
	}
	switch(true){
		case ($this->is_attribute_string($this->uri)):
			$this->need_redirect = false;
			break;
		case ($this->uri != $this->real_uri && !$this->not_null($this->path_info)):
			$this->need_redirect = false;
			break;
		case (is_numeric(strpos($this->uri, '.htm'))):
			$this->need_redirect = false;
			break;
		case (@eregi("(".@implode('|', $pattern).")", $this->uri)):
			$this->need_redirect = true;
			break;
		case (@eregi("(".@implode('|', $pattern).")", $this->path_info)):
			$this->need_redirect = true;
			break;
		default:
			break;			
	} # end switch
	$this->attributes['SEO_REDIRECT']['NEED_REDIRECT'] = $this->need_redirect ? 'true' : 'false';
} # end function set_seopage

Link to comment
Share on other sites

instead of doing all the changing this and that. if you delete a product/s and say google indexed it yeah it sucks but why not just add the contrib product not found but... heres this which is similar. Sounds alot easier to me.

 

Just a thought,

Link to comment
Share on other sites

instead of doing all the changing this and that. if you delete a product/s and say google indexed it yeah it sucks but why not just add the contrib product not found but... heres this which is similar. Sounds alot easier to me.

 

Just a thought,

 

The problem being is that my links in Google are NOT goign to a page which doesnt exist. The pages still exist but the URL name is incorrect, so Google is then storing several links to the same product, but under different URL names.

 

And deleting the product and then re-creating the product is impossible because all my products are updated daily by scripts. I do not add any products manually.

Also, I cannot afford to change product_id's and category_ids (which would result by deleting the product and then re-adding it) because my links are all over the internet, and a lot of those links are to specific products on my site.

 

I had looked at the product not found contrib before, and I remember thinking that it wont work for me as expected, but I can't remember why now.

 

Regards,

Chris

Link to comment
Share on other sites

Ok I understand now If I knew the answer on how to fix it I would tell

 

Sorry for the miss hap

 

Not a problem at all.

Thanks for trying to help though.

 

Hopefully someone out there has an answer for me :)

 

Cheers,

Chris

Link to comment
Share on other sites

Please Help,

 

I have installed Ultimate SEO URL 2.2, and i Have got error when the SEO is Enable.

 

When I try to make new account. The Primary Address Book is Not displayed, and this addres is colud be deleted, which the default it can,t be Deleted. Does anyone has the same error?

 

the error are could be seen below:

 

Primary Address

 

==> ,

 

 

 

And when I try to make new account again, an new error where displayed like this:

 

0 -

 

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('0', '0', now())

 

[TEP STOP]

 

 

colud anyone help me?

 

Thank you Very Much

 

Gunawan H

Link to comment
Share on other sites

Bug - in latest fix a bug - Ultimate SEO provides link like:

 

/movie-tshirts-blue-velvet-c-205_207.html?amp;products_id=43&action=buy_now

 

You need to fix it - in function parse_parameters before return:

 

$url = str_replace('?amp;','?',$url);

 

Well done and thnk you for posting this fix. It has sorted my problem with & appearing in the URL of the products so causing the redirect to fail.

 

One further question do you know how to make the redirected product URL show in the status bar? It displays correctly in all other respects except the products url from a category. From a category the product displays as

../product_info.php?products_id=28 for example. From everywhere else the redirected product URL displays.

 

Anyway thanks again for the above fix.

Link to comment
Share on other sites

The problem being is that my links in Google are NOT goign to a page which doesnt exist. The pages still exist but the URL name is incorrect, so Google is then storing several links to the same product, but under different URL names.

 

And deleting the product and then re-creating the product is impossible because all my products are updated daily by scripts. I do not add any products manually.

Also, I cannot afford to change product_id's and category_ids (which would result by deleting the product and then re-adding it) because my links are all over the internet, and a lot of those links are to specific products on my site.

 

I had looked at the product not found contrib before, and I remember thinking that it wont work for me as expected, but I can't remember why now.

 

Regards,

Chris

 

Have you tried to make a google xml sitemap and send it to google ?

I have changed the way url I rewriten not long ago and have found that google very quickly stop following the old url ... unlike yahoo

So maybe give this a try ;)

Link to comment
Share on other sites

Have you tried to make a google xml sitemap and send it to google ?

I have changed the way url I rewriten not long ago and have found that google very quickly stop following the old url ... unlike yahoo

So maybe give this a try ;)

 

I have been running the google XML sitemap for AGES now. It runs every day successfully, and when I log into the Google Sitemaps area, it always shows that it was successful and never any errors.

 

Regards,

Chris

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