301重定向怎么进行URL标准化设置?

seo优化 2022-07-27 12:20www.1681989.comseo排名

经常会碰到这样的情况,其他网站链接你的站点时,会用下面的链接

.example.

example./

.example./dex.html

example./dex.php

而这样导致你站点主域名的PR值分散到其他几个URL上。

如果你用301重定向把其他三个URL转到

.example.

PR也就集中在主域名.example. 了。

301重定向怎么进行URL标准化设置?

设置.htaess文件(只适用于lux系统,并需要虚拟主机支持。)

使访问example./的时候就会自动转到.example.

在.htaess文件里写上推火网以下代码即可。

RewriteEnge on

RewriteCond %{http_host} ^mydoma. [NC]

RewriteRule ^(.)$ http://.mydoma./$1 [L,R=301]

推火专家搜外网


Copyright © 2016-2025 www.1681989.com 推火网 版权所有 Power by