Ary SEO SEM

致力于英文SEO推广/外贸网站建设/外贸营销/电子商务研究与实践

« 网盛、慧聪、阿里巴巴 三巨头“火拼”B2B蓝莲花——SEO心情 »

301永久重定向小实验

鉴于301永久重定向的使用复杂度(APACHE服务器的配置不同),我针对现在一些热门的国外虚拟空间做了小小的测试,下面是测试结果(仅供参考,具体操作请咨询虚拟空间客服)!前后过渡,请参考:面向SEO建站与301永久重定向

   

实验目的:在IE中打开http://aaa.com或者http://www.aaa.com/index.html都会跳转到http://www.aaa.com/,集中PR和排名到http://www.aaa.com/
1.IXWEBHOSTING的301操作实验:
(1)在.htaccess中加入如下代码:

rewriteEngine on
rewriteCond %{http_host} ^aaa.com
rewriteRule ^(.*)$ http://www.aaa.com/$1 [R=301,L]

# Redirect client index.html requests to "/"
rewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.html HTTP/
rewriteRule ^index.html$ http://www.aaa.com/ [R=301,L]

(2)IE显示出错:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@aaa.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

(3)然后查询手册修改301代码如下:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.aaa.com$
RewriteRule ^(.*)$ http://www.aaa.com/$1 [R=301]
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ http://www.aaa.com/ [R=301,L]

(4)用301检查工具:http://www.internetofficer.com/seo-tool/redirect-check/,得到如下结果:

Type of redirect: 301 Moved Permanently

(5)在IE中打开http://aaa.com或者http://www.aaa.com/index.html都会跳转到http://www.aaa.com/
  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

图标汇集

  • 订阅本站的 ATOM 1.0 新闻聚合
  • 订阅本站的 RSS 2.0 新闻聚合

Powered By Z-Blog 1.7 Laputa Build 70216

Copyright Ary策划 SEO SEM Some Rights Reserved.