Wordpress:NGINX-重写规则问题

时间:2017-03-01 00:38:03

标签: wordpress .htaccess nginx

这是我对apache的htaccess:

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

# END WordPress

现在我转向nging,我看起来像这样:

REWRITE RULE

if (!-f $request_filename){
    set $rule_1 1$rule_1;
}
if (!-d $request_filename){
    set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
    rewrite /. /index.php last;
}

这有效,但是对于wp-admin,我必须有很多重定向,有人可以帮助我吗?

由于

0 个答案:

没有答案