Filed under: 应用体验 |
Posted on 01月 11th, 2010 作者: o仔
我的域名imouou.com 被google收录,不过收录的都是以前的链接。通过搜索引撃过来的都打不开网站,因为现在的链接已经更新,访客打不开页面,一个是体验不好,另一个可能在骂我骗点击呢。
如果通过一个404页面,告诉访客,你查找的信息链接已经更新,请重新进入博客查找,我相信很多人都会愿意去搜一下的,不知道各位对这个页面的体验怎样,欢迎留言。
通过下面的http://www.htaccesseditor.com/sc.shtml#a_access
地址,编辑生成一个.htaccess文件,传到网站根目录下,就能够自动跳转到404错误页面,你要做的只是把页面设计得好看一些。
.htaccess
<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>
Options -Indexes
ErrorDocument 404 http://imouou.com/404.html
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.imouou.com)(:80)? [NC]
RewriteRule ^(.*) http://imouou.com/$1 [R=301,L]
DirectoryIndex default.html index.html index.php default.php
order deny,allow
注意:.htaccess 文件是linux环境下appache的配置文件,如果你的环境是windows+iis,继续往下面看。
现在,我有两个博客域名,想把通过域名try800.com进入的链接,转到 imouou.com ,try800用的就是windows+IIS的环境,那么我只要定义301域名重置,以后就能把try800的流量转到 imouou.com 了。如果找不到链接,就会跳到404错误页面,再从404页面进入博客。
复制下面的代码,改成你的域名,另存成 httpd.ini ,传到根目录就行了。
===========将www.try800.com转移到www.imouou.com上================ # =====ISAPI_Rewrite 2.x==== 1 2 3 4 5 6 7 [ISAPI_Rewrite] # 3600 = 1 hour CacheClockRate 3600 # Collected By imouou.com RepeatLimit 32 RewriteCond Host: ^www.try800.com$ RewriteRule (.*) http://www.imouou.com$1 [I,RP] RewriteCond Host: ^try800.com$ RewriteRule (.*) http://imouou.com$1 [I,RP]
现在通过google搜索 site:imouou.com 或者 site:try800.com ,无论点击哪个链接,都能正确转向到我的博客了,流量保住了,可惜没能把地址都对应上去,等待google重新收录吧,暂时就委屈大家从首页进了。
对于这个404的体验怎样,欢迎拍砖!
« 华南植物园采花记
你捡到便宜了吗? »




01月 21st, 2010 at 12:41
写的很好
错误页面 和 空页面 提示越发的显得重要
看到博客有我的链接 感谢支持 :)
o仔 回复:
01月 21st, 2010 at 12:45
@刘钢, 呵呵谢谢,主要是你的博客写得不错,所以有必要经常去~~