资讯中心

301重定向怎么进行URL标准化设置?
  资讯来源:海力源码    发布时间:8/18/2022 2:25:53 PM
经常会碰到这样的情况,其他网站链接你的站点时,会用下面的链接:   www.example.com   example.com/   www.example.com/index.html   example.com/index.php       而这样导致:你站点主域名的PR值分散到其他几个URL上。   如果你用301重定向把其他三个URL转到 www.example.com  PR也就集中在主域名:www.example.com 了。   301重定向怎么进行URL标准化设置?   设置.htaccess文件(只适用于linux系统,并需要虚拟主机支持。)   使访问example.com/的时候就会自动转到www.example.com  在.htaccess文件里写上以下代码即可。   RewriteEngine on RewriteCond %{http_host} ^mydomain.com [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]      
上一条:如何查看网站被百度抓取的情况?
下一条:Google Analytics 分析的关键字怎么是乱码?


Copyright www.hailiym.com © 2022