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

  

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

1
2
3
4
5
if (!-e $request_filename) {

rewrite . /index.php last;

}

或者

1
2
3
4
5
if (!-e $request_filename) {

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

}

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

1
2
3
4
5
6
7
8
9
RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

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

1
2
3
4
5
6
7
8
9
10
11
url.rewrite = (

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

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

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

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

)

  •   正在提交中,请稍候...
      评论提交成功
    回复 的评论,点击取消回复

    账号密码登录