tags:

views:

35

answers:

1

Hi

I am using prestashop as the cart for my website. I have a problem; the website used to be in dynamic urls. I enabled friendly url writing. The problem is that one page has more than one url. You can access a same page from the dynamic url and static url. In fact a single page has 9 different urls. This obviously creates problems for seo as search engiones penalize my website for this.

What can I do to solve this problem? I have no knowledge of programming.

Here is the htaccess for the website. Any sample code or help is really appreciated.

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

# Catch 404 errors
ErrorDocument 404 /404.php
Options +FollowSymLinks 
RewriteEngine on 
RewriteCond %{HTTP_HOST} ^***.com [NC] 
RewriteRule ^(.*)$ http://www.***.com/$1 [L,R=301] 

Options +FollowSymLinks
RewriteEngine on
# index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301,L]

Header set Cache-Control: "no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0"
A: 

It's fairly simple in general. There's basically two ways. First of all, instead of just an internal rewrite, you could respond with a 301 redirect to the "canonical" version of the page (whatever you choose to be the canonical version). This will mean that people coming in via the old links will be redirected to the new links and so on. The search engines will also process the 301 redirects and only count the "final" destination as the real page.

Another option, if you don't want to redirect your users to the new page, is to include at the top of your page a <link> tag that points to the "canonical" version of the page that you want. From the search engine's point of view, the canonical link works just like a 301 redirect (in that it will only look at the "redirected" page) but users will not be redirected:

<link rel="canonical" href="http://www.example.com/lang-en/whatever/blah" />
Dean Harding
Hi CodekaThank you very much for your reply. I want to use the 301 redirect to the newest static url. How can I do this? There is 550 pages for each language and 17 languages in total. Is it possible to add a code which automatically detects the dynamic version and other versions of each page and redirects them to the newest url? if not what do you reccomend and how?Once again thanks
Ali Demirtas