当Wordpress静态页无法显示时,通过.htaccess实现伪静态页的方法

In: Wordpress

18 Jun 2009

现象:当你在后台布局好静态目录以后,发现前台的日志页面没法打开。

第一步:进入管理后台
Settings–>Permalinks–>Common settings

在Custom Structure选项里填写以下内容:

/archives/%postname%.html

第二步:还是在Settings–>Permalinks页面,注意看最下面

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

有这么一段,把这段代码复制到记事本里,然后通过ftp上传到博客根目录,然后把这个文本文件改成“.htaccess”,问题应该可以解决了。

注:你的网站服务器系统得是linux或者unix,并默认开启。windows服务器下的iis估计不行。

Comment Form

About this blog

小弟玩的不是博客,是Wordpress;

小哥写的不是日志,是Blog。

网址不是www.xlxh.com,而是www.xlxh.net

Photostream

  • 威尼斯 (232)
  • IMG_0382
  • Electric Barbarian
  • EU - Radtour  2010 317