Quantcast
Channel: Wut = { I.am() } » blog
Viewing all articles
Browse latest Browse all 2

WordPress Permalinks 出现 404 错误的解决办法

$
0
0

前几天在新机子上装了 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 服务,就好了~

(如果是用 XAMPP 的朋友,可能还需要参看原文修改 AllowOverride)

————

看了这篇文章,甚是惊讶,惊讶的不是美国居然还有人在用 Objective-C 和 Pascal,而是用这些古老语言做开发的薪水还很高。。。泪奔,不能丢了 Pascal 啊,以后出国说不定还得拿它混饭吃呢。


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles



Latest Images