Jump to content

SEO, lang-xx and new xx. Update from 1.3 to 1.4


adamus007p

Recommended Posts

In later Prestashop version there are lang-xx but in 1.4 there are xx.

Do presta have build in rewrite formulas?
I mean redirect 301?

I would be great if presta would contain in htacess redirect 301 from all old products to new links.

From http://www.my_domain.com/lang-xx/… to http://www.my_domain.com/xx/…
eg.
http://www.my_domain.com/lang-fr/
to
http://www.my_domain.com/fr/…

It would be very helpful for beginner users when it would be contained in p. 1.4

If you want to add this please write it here how to do it. Thank you. I will put this bug in forum.


--------------


when you have a shop in v. 1.3.x or earlier version.
Your all links are crawled like http://www.my_domain.com/lang-xx/something

when you have v. 1.4 your links will be crawled like
http://www.my_domain.com/xx/something

xx - is some language e.g. fr

So when you will update prestashow brand 1.3 to 1.4 you will have a lot of non exists links in google - 404 errors

To prevent it, you will be and keep your rank in google it is necessary to use 301 redirect in htaccess.

In other way, you will lost your all position in google and you site will start from scratch (zero).

By the time when your all link will be crawled by new link it is necessary use 301 redirect: from old links (1.3 - lang-xx included in this links) to new links (1.4 brand- xx like a language included in links).

I hope that now it is clear.

If you have any question please ask me.

Link to comment
Share on other sites

  • 4 weeks later...

I need only add do htacess file (new last line)?

I was trying to add but nothing happen. In browse I still see old names - /lang-fr/


eg. my file:
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /_prestashopsvn/img/p/$1-$2$3.jpg [QSA,L,E]
RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /_prestashopsvn/img/p/$1-$2.jpg [QSA,L,E]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /_prestashopsvn/img/c/$1$2.jpg [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /_prestashopsvn/product.php?id_product=$3&isolang;=$1$5 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /_prestashopsvn/product.php?id_product=$2&isolang;=$1$4 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /_prestashopsvn/category.php?id_category=$2&isolang;=$1 [QSA,L,E]
RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /_prestashopsvn/product.php?id_product=$2$4 [QSA,L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /_prestashopsvn/product.php?id_product=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /_prestashopsvn/category.php?id_category=$1 [QSA,L,E]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /_prestashopsvn/cms.php?id_cms=$1 [QSA,L,E]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /_prestashopsvn/supplier.php?id_supplier=$1$3 [QSA,L,E]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /_prestashopsvn/manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
RewriteRule ^lang-([a-z]{2})/(.*)$ /_prestashopsvn/$2?isolang=$1 [QSA,L,E]

# Catch 404 errors
ErrorDocument 404 /_prestashopsvn/404.php


RewriteRule ^lang-([a-z]{2})/(.*)$ /$1/$2 [R=301,NC] <<<<<<<<<<<<<< I added this line >>>>>>>>>>>>>

Link to comment
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
×
×
  • Create New...