一个页面有多个URL。搜索引擎给予处罚,请帮我出多个、帮我、页面、搜索引擎

2023-09-02 01:11:23 作者:小软糖

我使用prestashop的车,我的网站。我有个问题;该网站使用的是在动态URL。我启用了友好的URL写作。的问题是,一个页面有一个以上的网址。您可以从动态URL和静态URL访问同一页面。其实在一个页面有9个不同的URL。这显然​​创造了SEO问题搜索engiones惩罚我的网站上寻求答案。

我能做些什么来解决这个问题?我没有任何编程知识。

下面是htaccess的的网站。任何样品code或帮助确实是AP preciated。

 #URL重写模块激活
RewriteEngine叙述上

#URL重写规则
重写规则^([A-Z0-9] +)  - ([一个-Z0-9] +)(  -  [_一 - 杂 -  Z0-9  - ] *)/([_一 - 杂 -  Z0-9- ] *)。JPG $ /img/p/$1-$2$3.jpg [L,E]
重写规则^([0-9] +)  - ([0-9] +)/([_ A-ZA-Z0-9  - ] *) JPG $ /img/p/$1-$2.jpg [L ,E]
重写规则^([0-9] +)(  -  [_ A-ZA-Z0-9  - ] *)/([_ A-ZA-Z0-9  - ] *) JPG $ / IMG / C / $ 1 $ 2 .JPG [L,E]
重写规则^朗 - ([AZ] {2})/([A-ZA-Z0-9  - ] *)/([0-9] +)  - ([A-ZA-Z0-9  - ] *)  html的(。*)$ /product.php?id_product=$3&isolang=$1$5 [L,E]
重写规则^朗 - ([AZ] {2})/([0-9] +)  - ([A-ZA-Z0-9  - ] *)(。*) HTML $ /product.php?id_product = $ 2及isolang = $ 1 $ 4 L,E]
重写规则^朗 - ([AZ] {2})/([0-9] +)  - ([A-ZA-Z0-9  - ] *)(。*)$ /category.php?id_category=$2& ; isolang = $ 1 [QSA,L,E]
重写规则^([A-ZA-Z0-9  - ] *)/([0-9] +)  - ([A-ZA-Z0-9  - ] *) HTML $ /产品(*)。 PHP?id_product = $ 2 $ 4 L,E]
重写规则^([0-9] +)  - ([A-ZA-Z0-9  - ] *)(。*) HTML $ /product.php?id_product=$1$3 [L,E]
重写规则^([0-9] +)  - ([A-ZA-Z0-9  - ] *)(。*)$ /category.php?id_category=$1 [QSA,L,E]
重写规则^含量/([0-9] +)  - ([A-ZA-Z0-9  - ] *)(。*)$ /cms.php?id_cms=$1 [QSA,L,E]
重写规则^([0-9] +)__([A-ZA-Z0-9  - ] *)(。*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E]
重写规则^([0-9] +)_([A-ZA-Z0-9  - ] *)(。*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E]
重写规则^朗 - (。*)?([AZ] {2})/ $ / $ 2 isolang = $ 1 [QSA,L,E]

#捕获404错误
ErrorDocument的404 /404.php
选项​​+的FollowSymLinks
RewriteEngine叙述上
的RewriteCond%{HTTP_HOST} ^ ***。com [NC]
(。*)重写规则^ $ HTTP://www.***.com/$1 [L,R = 301]

选项​​+的FollowSymLinks
RewriteEngine叙述上
#index.php来/
的RewriteCond%{THE_REQUEST} ^ [AZ] {3,9}  /.*指数 .PHP  HTTP /
重写规则^(。*)指标的.php / $ 1 [R = 301,L]

头设置的Cache-Control:无店面,无缓存,必重新验证,pre-检查= 0,后检查= 0,最大年龄= 0
 

解决方案

这是一般非常简单。有两种基本方式。首先,而不只是一个内部的重写,你可以用301响应重定向到规范的网页版本(不管你选择是规范版本)。这意味着人们通过旧链接进来会被重定向到新的链接等。搜索引擎也将处理301重定向,只算最终目的地,真正的页面。

另一种选择,如果你不希望将用户重定向到新的页面,是包括你的页面&LT的顶部;链接> 标签指向规范的版本,您想要的页面。但从搜索引擎的角度来看,规范的链接的作品就像一个301重定向(因为它只会看重定向页面),但用户不会被重定向:

 <链接REL =规范的href =htt​​p://www.example.com/lang-en/whatever/blah/>
 
又出来一款好用的搜索引擎

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"

解决方案

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" />