301重定向,RedirectMatch permanent/301
[ 2006/06/05 01:55 | by 极品蜗牛 ]
301重定向在.htaccess中的写法是:
另外,410永久移除的写法是:
RedirectMatch permanent /htmpage.* http://www.chong4.cn/index.html
或RedirectMatch 301 /htmpage.* http://www.chong4.cn/index.html
效果是所有以/htmpage开头的网址(比如/htmpage/index.html、/htmpage.html)重新定向到http://www.chong4.cn/index.htmlRedirect permanent /fushi/ http://www.chong4.cn/fushi/
效果是所有fushi目录下的网址重新定向到http://www.chong4.cn/fushi/目录下(比如/fushi/index.html会重新定向到http://www.chong4.cn/fushi/index.html)另外,410永久移除的写法是:
RedirectMatch gone /htmpage.*
详细介绍看这里。
错误410,HTTP Error 410,Rewrite
[ 2006/05/31 02:04 | by 极品蜗牛 ]
网站上的数据删除掉后,有些搜索引擎蜘蛛还是会傻傻的每天都来领个404回去...(比如Baidu,比如Sogou),它们这些畜生基本上不看Robots.txt文件的...410代码说明了一个文件Gone啦...而不是暂时找不到。这篇文章介绍了410代码以及几种实现方法(比如 Rewrite)