关于Permalink
September 30th, 2005 at 10:39 pm (Blog 系统)
今天无事在 wordpress 后台闲逛,不经意间发现了 Permalink。Permalink 顾名思义好像是永久链接的意思,可以使地址更美观、可用性好和便于搜索。这么好的东西为什么不用呢?
1.服务器用的是 apache,所以先去 httpd.conf 确认载入了 mod_rewrite 模块。
2.确认 blog 所在目录选项:AllowOverride All。
3.Permalink 结构采用的是”/%post_id%.html”。这也是根据雨吁的经验。
顺便看了一下 mod_rewrite 模块,官方说这东西比较复杂,别想在一两天搞明白。不过根据官方的文档,wordpress 采用的这种方法效率较低,但是好处在于对终端用户亲和力比较强,不需要写那么多的规则。所以牺牲一些性能是值得的。