wordpress在Nginx/litespeed/Lighttpd服务器下的rewrite重写规则

老牛  2011-10-11 19:49  阅读 233 views 次 评论 0 条
摘要:

你需要的各种服务器下wordpress静态化rewrite规则都有!

1.Nginx配置wordpress伪静态 Nignx.conf重写伪静态

if (!-e $request_filename) {

rewrite . /index.php last;

}

或者

if (!-e $request_filename) {

rewrite ^(.*)$ /index.php?q=$1 last;

}

2. litespeed配置wordpress重写伪静态 同Apache的相同并支持.htaccess

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

3.然后是 Lighttpd配置wordpress重写伪静态 lighttpd.conf重写伪静态

url.rewrite = (

"^/(wp-. ).*/?" => "$0",

"^/(sitemap.xml)" => "$0",

"^/(xmlrpc.php)" => "$0",

"^/(. )/?$" => "/index.php/$1"

)

本文地址:http://xiaohost.com/56.html
版权声明:本文为原创文章,版权归 老牛 所有,欢迎分享本文,转载请保留出处!

发表评论


表情