VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: franayala on August 19, 2014, 00:11:55 AM

Title: New router.php [SOLVED]
Post by: franayala on August 19, 2014, 00:11:55 AM
Hi there

In version 2.6.8 has improved router.

Google has indexed my website as http: //domain/category1/subcategory2/subcategory3/product.html.

Now the router uses http: //domain/subcategory3/producto.html.

Both URLs are now working but ... that will not generate duplicate content?

The file router.php do a 301 redirect? I think not. You could do it? This way we avoid duplicate content and google does not penalize.

Thanks
Title: Re: New router.php
Post by: one2one on August 23, 2014, 13:16:44 PM
Hello.

It is the same with me. Does anyone have any idea how to stop duplicates. I do not think router.php works well - change urls of my menu when I am a product of the same category.
Title: Re: New router.php
Post by: franayala on August 23, 2014, 14:59:50 PM
The problem is: Google have indexed a lot of old url like /domain/fisrtcategory/.../lastcategory/product and now find all changed to /domain/lastcategory/product

This is a good idea because a short url is a good choice for SEO purposes but if you change all url without 301 redirection... Google will find a lot of changes and your seo will be afected.

If the 301 redirect is kept for several versions, google replaced the old URL to the new URL and not lose SEO positioning.

But this 301 redirect should be done in the router.php, I think, because I do it by htaccess is quite expensive and I think it is even impossible to control.

I upgraded to 2.6.8. I can not go back to 2.6.6 because we mistakenly overwrite the backup. If not, go back to 2.6.6 for this item. It's too important.
Title: Re: New router.php
Post by: Milbo on August 23, 2014, 20:40:20 PM
You could just exchange the router file. Or we find a way to set automatically a 301, but actually both links are still working. and all have the same canonical, so I think your problem isnt any, it is just theoretically, by the knowing "I am not allowed to have two links pointing on the the same content", but I can assure you, google does not work that simple.
Title: Re: New router.php
Post by: franayala on August 24, 2014, 19:39:44 PM
We can overwrite the router.php with the 2.6.6 version??
Title: Re: New router.php
Post by: Milbo on August 25, 2014, 20:56:51 PM
Should work, yes.
Title: Re: New router.php
Post by: franayala on August 25, 2014, 21:09:32 PM
Thanks a lot, Milbo
Title: Re: New router.php
Post by: jjk on August 25, 2014, 21:50:44 PM
@franayala
Just for your info:
http://www.theshortcutts.com/question/does-the-number-of-subdirectories-in-a-url-affect-its-ranking
https://support.google.com/webmasters/answer/139066