wordpress的功能很完善,也很强大,所以用的人很多(这是废话) 。Linux主机,直接支持伪静态的。win主机需要设置,需要在根目录下面添加一个文件httpd.ini,网上也有很多关于httpd.ini的写法,但是用了很多,都没有用,因为自己不懂技术,所以找了半天,找到以下这段代码比较管用,故此分享出来……

新建一个文本文档,命名为httpd.ini,然后在httpd.ini 中加入如下代码:

[ISAPI_Rewrite]

# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through

RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]

记得一定要把httpd.ind上传到根目录哦。

附:httpd是Apache超文本传输协议(HTTP)服务器的主程序。被设计为一个独立运行的后台进程,它会建立一个处理请求的子进程或线程的池。

通常,httpd不应该被直接调用,而应该在类Unix系统中由apachectl调用,在Windows NT/2000/XP/2003中作为服务运行和在Windows 95/98/ME中作为控制台程序运行.