存档

文章标签 ‘SEO’

更新固定链接格式

2009年12月25日 没有评论

为了搜索引擎能更好的理解,也为了别人能搜到对应的文章,最好不要在链接里带”?”,而wordpress的单篇博客链接默认是xxx?p=id,这种,对于搜索引擎不友好。

我的环境,debian lenny + lighttpd + php5

  1. 登录管理页面,设置->固定链接,选择自定义,我的格式是 /archives/year/month/postname.html
  2. sudo vim /etc/php/cgi/php.ini,在最后加上 cgi.fix_pathinfo=1,不设为1会遇到”No input file specified”
  3. 在lighttpd.conf的host配置里加上,server.error-handler-404 = "/index.php?error=404"
  4. 重启lighttpd

参考

  1. lighttpd and wordpress setup clean SEO friendly urls
  2. lighttpd FAQs
  3. wordpress 链接参数说明
分类: 建站 标签: , ,