Wordpress Permalinks 出现 404 错误的解决办法
Friday, June 13th, 2008前几天在新机子上装了 WAMP,下载了 Wordpress 2.5.1,并配置好数据库,准备继续我那很久很久以前未完成的 theme。
然而,在 Settings 里改变了默认的 Permalink Structure 后,发现所有包含地址重定向的页面都 404 了。很奇怪,理论上 2.5.1 应该已经解决了 Permalink 的 bug 了呀。把 Permalink Structure 从
/%year%/%monthnum%/%postname%/
改成
/index.php/%year%/%monthnum%/%postname%/
页面都能打开了,看来应该是重定向的问题。
三上 Google,终于在这篇文章里找到了原因,果然是我本地的 WAMP 没打开 rewrite 功能,解决办法如下:
打开 Apache 的 httpd.conf 文件,搜索“mod_rewrite”,应该能找到这一行:
#LoadModule rewrite_module modules/mod_rewrite.so
把最前面的“#”删掉,重启 Apache 服务,就好了~






